[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 18:36:51 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a43c70963bd8f66514d170d0b9dc5543d34984eb
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 14 17:49:06 2010 +0000

    2010-12-14  Andreas Kling  <andreas.kling at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Avoid GraphicsContext save/restore in Image::drawPattern()
            https://bugs.webkit.org/show_bug.cgi?id=51037
    
            It's enough to restore the CompositeOperator after drawing.
    
            * platform/graphics/qt/ImageQt.cpp:
            (WebCore::Image::drawPattern):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74035 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1abf15c..1f27fcf 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-14  Andreas Kling  <andreas.kling at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Avoid GraphicsContext save/restore in Image::drawPattern()
+        https://bugs.webkit.org/show_bug.cgi?id=51037
+
+        It's enough to restore the CompositeOperator after drawing.
+
+        * platform/graphics/qt/ImageQt.cpp:
+        (WebCore::Image::drawPattern):
+
 2010-12-14  Eric Carlson  <eric.carlson at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebCore/platform/graphics/qt/ImageQt.cpp b/WebCore/platform/graphics/qt/ImageQt.cpp
index 3611308..f713d37 100644
--- a/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -114,7 +114,7 @@ void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const
     if (tr.x() || tr.y() || tr.width() != pixmap.width() || tr.height() != pixmap.height())
         pixmap = pixmap.copy(tr);
 
-    ctxt->save();
+    CompositeOperator previousOperator = ctxt->compositeOperation();
 
     ctxt->setCompositeOperation(op);
     QPainter* p = ctxt->platformContext();
@@ -130,7 +130,7 @@ void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const
     b.setTransform(transform);
     p->fillRect(dr, b);
 
-    ctxt->restore();
+    ctxt->setCompositeOperation(previousOperator);
 
     if (imageObserver())
         imageObserver()->didDraw(this);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list