[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 11:31:55 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 599b8278bc4d9fc5d7bceb016daeb386d0699ac4
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 28 12:55:25 2010 +0000

    2010-07-28  Andreas Kling  <andreas.kling at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] putImageData(): Combine premultiplication and BGR->RGB
            https://bugs.webkit.org/show_bug.cgi?id=43114
    
            Further optimized putImageData() by doing BGR->RGB inside the
            premultiplication routine.
    
            * platform/graphics/qt/ImageBufferQt.cpp:
            (WebCore::premultiplyABGRtoARGB): Renamed from premultiply.
            (WebCore::putImageData):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64202 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5d22654..8c12f6c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-07-28  Andreas Kling  <andreas.kling at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] putImageData(): Combine premultiplication and BGR->RGB
+        https://bugs.webkit.org/show_bug.cgi?id=43114
+
+        Further optimized putImageData() by doing BGR->RGB inside the
+        premultiplication routine.
+
+        * platform/graphics/qt/ImageBufferQt.cpp:
+        (WebCore::premultiplyABGRtoARGB): Renamed from premultiply.
+        (WebCore::putImageData):
+
 2010-07-28  Andrei Popescu  <andreip at google.com>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/WebCore/platform/graphics/qt/ImageBufferQt.cpp
index e0e2de6..bc25003 100644
--- a/WebCore/platform/graphics/qt/ImageBufferQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageBufferQt.cpp
@@ -237,14 +237,14 @@ PassRefPtr<ImageData> ImageBuffer::getPremultipliedImageData(const IntRect& rect
     return getImageData<Premultiplied>(rect, m_data, m_size);
 }
 
-static inline unsigned int premultiply(unsigned int x)
+static inline unsigned int premultiplyABGRtoARGB(unsigned int x)
 {
     unsigned int a = x >> 24;
     if (a == 255)
-        return x;
+        return (x << 16) | ((x >> 16) & 0xff) | (x & 0xff00ff00);
     unsigned int t = (x & 0xff00ff) * a;
     t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
-    t &= 0xff00ff;
+    t = ((t << 16) | (t >> 16)) & 0xff00ff;
 
     x = ((x >> 8) & 0xff) * a;
     x = (x + ((x >> 8) & 0xff) + 0x80);
@@ -297,7 +297,7 @@ void putImageData(ImageData*& source, const IntRect& sourceRect, const IntPoint&
             for (int x = 0; x < numColumns; x++) {
                 // Premultiply and convert BGR to RGB.
                 quint32 pixel = srcScanLine[x];
-                destScanLine[x] = premultiply(((pixel << 16) & 0xff0000) | ((pixel >> 16) & 0xff) | (pixel & 0xff00ff00));
+                destScanLine[x] = premultiplyABGRtoARGB(pixel);
             }
             srcScanLine += source->width();
         }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list