[Webkit-unassigned] [Bug 80714] [Qt] [WK2] Shouldn't use item for clipping rect calculation in paint node.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 9 13:27:09 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=80714
Noam Rosenthal <noam.rosenthal at nokia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #131067|review?, commit-queue? |review-, commit-queue-
Flag| |
--- Comment #2 from Noam Rosenthal <noam.rosenthal at nokia.com> 2012-03-09 13:27:09 PST ---
(From update of attachment 131067)
View in context: https://bugs.webkit.org/attachment.cgi?id=131067&action=review
> Source/WebKit2/ChangeLog:8
> + Replace item based clipping rect calculation with clipping nodes based.
Explain that this is needed for threaded rendering, where you don't have access to the items.
> Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp:121
> + static void adjustBoundingRect(QRectF& rect, const QPointF& point)
rename uniteRectWithPoint
> Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp:131
> + if (rect.top() > point.y())
> + rect.setTop(point.y());
> + else if (rect.bottom() < point.y())
> + rect.setBottom(point.y());
> +
> + if (rect.left() > point.x())
> + rect.setLeft(point.x());
> + else if (rect.right() < point.x())
> + rect.setRight(point.x());
rect |= QRectF(point, QSizeF(1, 1));
> Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp:137
> + QRectF retRect(0, 0, -1, -1);
retRect -> resultRect
> Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp:139
> + while (clip) {
Would be nicer as a for loop
for (const QSGClipNode* clip = clipList(); clip; clip = clip->clipList)
> Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp:140
> + QMatrix4x4 m;
m -> matrix or clipMatrix
> Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp:142
> + m *= *clip->matrix();
Why multiply instead of assign?
> Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp:152
> + if (geometry->vertexCount() > 1) {
Shouldn't it be 2? I don't see the point in a single-line clip.
Also, this requires a comment.
> Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp:153
> + currentClip.setTopLeft(m.map(QPoint(geometryPoints[0].x, geometryPoints[0].y)));
If you use my unite suggestion, you don't need this and can simply start from 0.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list