[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreas.kling at nokia.com
andreas.kling at nokia.com
Wed Dec 22 12:14:29 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e3baaf678bfaeb936bc900e3b799ee26b761fe1e
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 17 18:43:56 2010 +0000
2010-08-17 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Ariya Hidayat.
[Qt] Path: Fast approximation of stroke bounding rects
https://bugs.webkit.org/show_bug.cgi?id=44014
In canvas's stroke(), use QPainterPath::controlPointRect() to calculate
a slightly larger bounding rect in a fraction of the time.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::stroke):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 41861f2..8ca6f7a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-17 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Path: Fast approximation of stroke bounding rects
+ https://bugs.webkit.org/show_bug.cgi?id=44014
+
+ In canvas's stroke(), use QPainterPath::controlPointRect() to calculate
+ a slightly larger bounding rect in a fraction of the time.
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::stroke):
+
2010-08-17 Girish Ramakrishnan <girish at forwardbias.in>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 702b109..59249aa 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -825,8 +825,16 @@ void CanvasRenderingContext2D::stroke()
c->beginPath();
c->addPath(m_path);
+#if PLATFORM(QT)
+ // Fast approximation of the stroke's bounding rect.
+ // This yields a slightly oversized rect but is very fast
+ // compared to Path::strokeBoundingRect().
+ FloatRect boundingRect = m_path.platformPath().controlPointRect();
+ boundingRect.inflate(state().m_miterLimit + state().m_lineWidth);
+#else
CanvasStrokeStyleApplier strokeApplier(this);
FloatRect boundingRect = m_path.strokeBoundingRect(&strokeApplier);
+#endif
willDraw(boundingRect);
c->strokePath();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list