[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

mrobinson at webkit.org mrobinson at webkit.org
Fri Jan 21 14:58:35 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 75be8d5781a4c1877c6cb2fa0a1aaf1a97d8518c
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 5 20:33:48 2011 +0000

    2011-01-05  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Ariya Hidayat.
    
            ContextShadow::blurLayerImage() not endian-safe
            https://bugs.webkit.org/show_bug.cgi?id=51822
    
            Correct the channel map in ContextShadow to reflect the different
            ordering of pixels on processors with different endianness.
    
            No new tests. This is covered by the existing shadow tests. It was
            not discovered, because all of the bots using ContextShadow are
            little-endian.
    
            * platform/graphics/ContextShadow.cpp:
            (WebCore::ContextShadow::blurLayerImage): Initialize the channel mapping
            based on machine endianness.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75095 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4b41cb0..344efe2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2011-01-05  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Ariya Hidayat.
+
+        ContextShadow::blurLayerImage() not endian-safe
+        https://bugs.webkit.org/show_bug.cgi?id=51822
+
+        Correct the channel map in ContextShadow to reflect the different
+        ordering of pixels on processors with different endianness.
+
+        No new tests. This is covered by the existing shadow tests. It was
+        not discovered, because all of the bots using ContextShadow are
+        little-endian.
+
+        * platform/graphics/ContextShadow.cpp:
+        (WebCore::ContextShadow::blurLayerImage): Initialize the channel mapping
+        based on machine endianness.
+
 2011-01-05  Mihai Parparita  <mihaip at chromium.org>
 
         Reviewed by Nate Chapin.
diff --git a/WebCore/platform/graphics/ContextShadow.cpp b/WebCore/platform/graphics/ContextShadow.cpp
index 763e595..7becda7 100644
--- a/WebCore/platform/graphics/ContextShadow.cpp
+++ b/WebCore/platform/graphics/ContextShadow.cpp
@@ -108,7 +108,14 @@ static const int BlurSumShift = 15;
 
 void ContextShadow::blurLayerImage(unsigned char* imageData, const IntSize& size, int rowStride)
 {
+#if CPU(BIG_ENDIAN)
+    int channels[4] = { 0, 3, 2, 0 };
+#elif CPU(MIDDLE_ENDIAN)
+    int channels[4] = { 1, 2, 3, 1 };
+#else
     int channels[4] = { 3, 0, 1, 3 };
+#endif
+
     int d = max(2, static_cast<int>(floorf((2 / 3.f) * m_blurDistance)));
     int dmax = d >> 1;
     int dmin = dmax - 1 + (d & 1);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list