[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:19:10 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 95584bd47fbcf3dfc4fb43ea5b458cb60d90fc1b
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 19 12:45:50 2010 +0000

    2010-07-19  Andreas Kling  <andreas.kling at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Avoid QImage::pixel() in getImageData()
            https://bugs.webkit.org/show_bug.cgi?id=42463
    
            * platform/graphics/qt/ImageBufferQt.cpp:
            (WebCore::getImageData): Use QImage::scanLine() instead
            of fetching data pixel-by-pixel.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63652 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 98a682f..0298cea 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-07-19  Andreas Kling  <andreas.kling at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Avoid QImage::pixel() in getImageData()
+        https://bugs.webkit.org/show_bug.cgi?id=42463
+
+        * platform/graphics/qt/ImageBufferQt.cpp:
+        (WebCore::getImageData): Use QImage::scanLine() instead
+        of fetching data pixel-by-pixel.
+
 2010-07-19  Yury Semikhatsky  <yurys at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/WebCore/platform/graphics/qt/ImageBufferQt.cpp
index 043a8c5..b4ca617 100644
--- a/WebCore/platform/graphics/qt/ImageBufferQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageBufferQt.cpp
@@ -186,8 +186,13 @@ PassRefPtr<ImageData> getImageData(const IntRect& rect, const ImageBufferData& i
     unsigned destBytesPerRow = 4 * rect.width();
     unsigned char* destRows = data + desty * destBytesPerRow + destx * 4;
     for (int y = 0; y < numRows; ++y) {
+#if QT_VERSION >= 0x040700
+        const quint32* scanLine = reinterpret_cast<const quint32*>(image.constScanLine(y + originy));
+#else
+        quint32* scanLine = reinterpret_cast<quint32*>(image.scanLine(y + originy));
+#endif
         for (int x = 0; x < numColumns; x++) {
-            QRgb value = image.pixel(x + originx, y + originy);
+            QRgb value = scanLine[x + originx];
             int basex = x * 4;
 
             destRows[basex] = qRed(value);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list