[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

andreas.kling at nokia.com andreas.kling at nokia.com
Wed Dec 22 17:49:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 57821b94cecb991257edd3a8ead0b5cd62fd8149
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 30 20:59:00 2010 +0000

    2010-11-30  Andreas Kling  <kling at webkit.org>
    
            Reviewed by Tor Arne Vestbø.
    
            [Qt] GraphicsContext: Avoid unnecessarily copying the painter's QTransform
    
            Stash the transform in a const reference (QPainter::transform() returns one)
            instead of making a copy in the shadow drawing parts of fillPath, strokePath and fillRect.
    
            * platform/graphics/qt/GraphicsContextQt.cpp:
            (WebCore::GraphicsContext::fillPath):
            (WebCore::GraphicsContext::strokePath):
            (WebCore::GraphicsContext::fillRect):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72956 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9559306..f566ca7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-30  Andreas Kling  <kling at webkit.org>
+
+        Reviewed by Tor Arne Vestbø.
+
+        [Qt] GraphicsContext: Avoid unnecessarily copying the painter's QTransform
+
+        Stash the transform in a const reference (QPainter::transform() returns one)
+        instead of making a copy in the shadow drawing parts of fillPath, strokePath and fillRect.
+
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::fillRect):
+
 2010-11-30  Vangelis Kokkevis  <vangelis at chromium.org>
 
         Reviewed by Simon Fraser.
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 3d8eb3c..a840525 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -513,7 +513,7 @@ void GraphicsContext::fillPath(const Path& path)
             && !m_common->state.fillPattern && !m_common->state.fillGradient)
         {
             QPointF offset = shadow->offset();
-            const QTransform transform = p->transform();
+            const QTransform& transform = p->transform();
             if (transform.isScaling()) {
                 // If scaling is required, find the new coord for shadow origin,
                 // so that the relative offset to its shape is kept.
@@ -567,7 +567,7 @@ void GraphicsContext::strokePath(const Path& path)
             QPen shadowPen(pen);
             shadowPen.setColor(m_data->shadow.m_color);
             QPointF offset = shadow->offset();
-            const QTransform transform = p->transform();
+            const QTransform& transform = p->transform();
             if (transform.isScaling()) {
                 // If scaling is required, find the new coord for shadow origin,
                 // so that the relative offset to its shape is kept.
@@ -721,7 +721,7 @@ void GraphicsContext::fillRect(const FloatRect& rect)
                 // without using the shadow layer at all.
                 QColor shadowColor = shadow->m_color;
                 shadowColor.setAlphaF(shadowColor.alphaF() * p->brush().color().alphaF());
-                const QTransform transform = p->transform();
+                const QTransform& transform = p->transform();
                 if (transform.isScaling()) {
                     p->fillRect(normalizedRect.translated(static_cast<qreal>(shadow->offset().x()) / transform.m11(),
                                                           static_cast<qreal>(shadow->offset().y()  / transform.m22())),

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list