[webkit-reviews] review denied: [Bug 76661] [Qt] [WK2] Support threaded renderer in WK2 : [Attachment 130973] Updated patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 8 22:02:21 PST 2012


Noam Rosenthal <noam.rosenthal at nokia.com> has denied Viatcheslav Ostapenko
<ostapenko.viatcheslav at nokia.com>'s request for review:
Bug 76661: [Qt] [WK2] Support threaded renderer in WK2
https://bugs.webkit.org/show_bug.cgi?id=76661

Attachment 130973: Updated patch
https://bugs.webkit.org/attachment.cgi?id=130973&action=review

------- Additional Comments from Noam Rosenthal <noam.rosenthal at nokia.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=130973&action=review


Something about this doesn't feel right. I understand why the sequence of
things and why it's needed for thread-safety, but the class abstraction seems a
bit over-complicated. I have only minor suggestions right but let me look at it
more thoroughly tomorrow to see if something can be simplified.
I'm afraid that right now complex thread-safe code like this would be very
prone to bugs that are hard to detect or fix.

> Source/WebKit2/ChangeLog:101
> +	   (WebKit::QtLayerTreeSGNode::QtLayerTreeSGNode):

QtWebPageSGNode

> Source/WebKit2/UIProcess/LayerTreeHostProxy.h:69
> +    QSGNode* updatePaintNode(QSGNode* oldNode);

Put in PLATFORM(QT)

> Source/WebKit2/UIProcess/LayerTreePaintData.h:49
> +    void paintToCurrentGLContext(const WebCore::TransformationMatrix&,
float, const WebCore::FloatRect&);

Spell out:
float opacity
FloatRect clip

> Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp:163
> +void LayerTreeHostProxy::setPaintScale(float scale)

setScale

> Source/WebKit2/UIProcess/qt/LayerTreePaintDataQt.cpp:22
> +#include "LayerTreePaintData.h"

Let's call it WebLayerTreeRenderer

> Source/WebKit2/UIProcess/qt/QtLayerTreeSGNode.cpp:22
> +#if USE(ACCELERATED_COMPOSITING)

This is not needed

> Source/WebKit2/UIProcess/qt/QtLayerTreeSGNode.cpp:43
> +    QMatrix4x4 m;

m -> matrix

> Source/WebKit2/UIProcess/qt/QtLayerTreeSGNode.cpp:46
> +    m.scale(m_layerTreePaintData->scale());

Please explain

> Source/WebKit2/UIProcess/qt/QtLayerTreeSGNode.cpp:56
> +static QPointF toViewPortCoordinates(const QPointF& point, const QRectF&
viewport)

ViewPort -> Viewport

> Source/WebKit2/UIProcess/qt/QtLayerTreeSGNode.cpp:59
> +    return QPointF((point.x() + 1) * viewport.width() * 0.5,
> +		      viewport.height() - (point.y() + 1) * viewport.height() *
0.5);

Comment

> Source/WebKit2/UIProcess/qt/QtLayerTreeSGNode.cpp:85
> +	   QMatrix4x4 m = *(state.projectionMatrix);

Hmmm... we're multiplying by the projectionMatrix and then applying
toViewPortCoordinates which cancels it out. Seems like this is not 100% thought
out.

> Source/WebKit2/UIProcess/qt/QtLayerTreeSGNode.cpp:95
> +	      
currentClip.setTopLeft(toViewPortCoordinates(m.map(clipRect.topLeft()),
viewportRect));
> +	       adjustBoundingRect(currentClip,
toViewPortCoordinates(m.map(clipRect.topRight()), viewportRect));
> +	       adjustBoundingRect(currentClip,
toViewPortCoordinates(m.map(clipRect.bottomLeft()), viewportRect));
> +	       adjustBoundingRect(currentClip,
toViewPortCoordinates(m.map(clipRect.bottomRight()), viewportRect));

This looks very much like a rect.unite... why not just do that?


More information about the webkit-reviews mailing list