[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

ariya at webkit.org ariya at webkit.org
Fri Feb 26 22:19:11 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 9b0e62b2d1d48127ac32cc4ea362daed4703d31d
Author: ariya at webkit.org <ariya at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Feb 13 03:01:18 2010 +0000

    2010-02-11  Ariya Hidayat  <ariya.hidayat at gmail.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Unnecessary QBrush construction for doing a solid color stroke
            https://bugs.webkit.org/show_bug.cgi?id=34874
    
            Use the similar trick like in r54347, i.e. use the special brush for
            solid color to avoid expensive QBrush constructor.
    
            * platform/graphics/qt/GraphicsContextQt.cpp:
            (WebCore::GraphicsContext::setPlatformStrokeColor):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54746 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e87a05d..d9811f6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+    2010-02-11  Ariya Hidayat  <ariya.hidayat at gmail.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Unnecessary QBrush construction for doing a solid color stroke
+        https://bugs.webkit.org/show_bug.cgi?id=34874
+
+        Use the similar trick like in r54347, i.e. use the special brush for
+        solid color to avoid expensive QBrush constructor.
+
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::setPlatformStrokeColor):
+
 2010-02-11  Darin Fisher  <darin at chromium.org>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 105d866..3331f1a 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -219,6 +219,7 @@ public:
     QStack<TransparencyLayer*> layers;
     QPainter* redirect;
 
+    // reuse this brush for solid color (to prevent expensive QBrush construction)
     QBrush solidColor;
 
     InterpolationQuality imageInterpolationQuality;
@@ -1112,7 +1113,8 @@ void GraphicsContext::setPlatformStrokeColor(const Color& color, ColorSpace colo
         return;
     QPainter* p = m_data->p();
     QPen newPen(p->pen());
-    newPen.setColor(color);
+    m_data->solidColor.setColor(color);
+    newPen.setBrush(m_data->solidColor);
     p->setPen(newPen);
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list