[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 12:19:09 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 887b956cd290f0f6a1477ccfff5c5281770c0f78
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Aug 19 05:20:22 2010 +0000
2010-08-18 Simon Hausmann <simon.hausmann at nokia.com>
Reviewed by Ariya Hidayat.
[Qt] Implement GraphicsContext::clipOut more efficiently
https://bugs.webkit.org/show_bug.cgi?id=43416
The current implementation of clipOut uses QPainter::clipRegion().boundingRect(),
which is a very slow function because it converts the entire clip region - which
may potentially contain a complex path - into a set of QRegion rectangles, just
to throw away all that information and use the bounding rect.
QTBUG-12618 implements a faster function in QPainter: QPainter::clipBoundingRect().
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::clipOut): Use QPainter::clipBoundingRect() with Qt >= 4.8.
(WebCore::GraphicsContext::clipOutEllipseInRect): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2c02be0..2b809c1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-08-18 Simon Hausmann <simon.hausmann at nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Implement GraphicsContext::clipOut more efficiently
+ https://bugs.webkit.org/show_bug.cgi?id=43416
+
+ The current implementation of clipOut uses QPainter::clipRegion().boundingRect(),
+ which is a very slow function because it converts the entire clip region - which
+ may potentially contain a complex path - into a set of QRegion rectangles, just
+ to throw away all that information and use the bounding rect.
+
+ QTBUG-12618 implements a faster function in QPainter: QPainter::clipBoundingRect().
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::clipOut): Use QPainter::clipBoundingRect() with Qt >= 4.8.
+ (WebCore::GraphicsContext::clipOutEllipseInRect): Ditto.
+
2010-08-18 Martin Robinson <mrobinson at igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 1632804..6218e00 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -1056,7 +1056,11 @@ void GraphicsContext::clipOut(const Path& path)
QPainterPath newClip;
newClip.setFillRule(Qt::OddEvenFill);
if (p->hasClipping()) {
+#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
+ newClip.addRect(p->clipBoundingRect());
+#else
newClip.addRect(p->clipRegion().boundingRect());
+#endif
newClip.addPath(clippedOut);
p->setClipPath(newClip, Qt::IntersectClip);
} else {
@@ -1126,7 +1130,11 @@ void GraphicsContext::clipOut(const IntRect& rect)
QPainterPath newClip;
newClip.setFillRule(Qt::OddEvenFill);
if (p->hasClipping()) {
+#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
+ newClip.addRect(p->clipBoundingRect());
+#else
newClip.addRect(p->clipRegion().boundingRect());
+#endif
newClip.addRect(QRect(rect));
p->setClipPath(newClip, Qt::IntersectClip);
} else {
@@ -1148,7 +1156,11 @@ void GraphicsContext::clipOutEllipseInRect(const IntRect& rect)
QPainterPath newClip;
newClip.setFillRule(Qt::OddEvenFill);
if (p->hasClipping()) {
+#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
+ newClip.addRect(p->clipBoundingRect());
+#else
newClip.addRect(p->clipRegion().boundingRect());
+#endif
newClip.addEllipse(QRect(rect));
p->setClipPath(newClip, Qt::IntersectClip);
} else {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list