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

commit-queue at webkit.org commit-queue at webkit.org
Fri Jan 21 14:37:59 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit e0ef7cd505c3e7de4e6046c4593fecb7fbc8c591
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 23 16:56:36 2010 +0000

    2010-12-23  W. James MacLean  <wjmaclean at chromium.org>
    
            Reviewed by Kenneth Russell.
    
            [chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
            https://bugs.webkit.org/show_bug.cgi?id=51186
    
            No new tests. Behaviour not changed, but need the asserts to detect when assumptions violated.
    
            * platform/graphics/chromium/ImageLayerChromium.cpp:
            (WebCore::ImageLayerChromium::updateContentsIfDirty):
            * platform/graphics/skia/GraphicsContext3DSkia.cpp:
            (WebCore::GraphicsContext3D::getImageData):
    2010-12-23  W. James MacLean  <wjmaclean at chromium.org>
    
            Reviewed by Kenneth Russell.
    
            [chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
            https://bugs.webkit.org/show_bug.cgi?id=51186
    
            Add asserts to detect if assumptions (about contiguous pixels in Skia bitmaps) are violated.
    
            * src/GraphicsContext3DChromium.cpp:
            (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74561 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d25d87f..2678659 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-23  W. James MacLean  <wjmaclean at chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        [chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
+        https://bugs.webkit.org/show_bug.cgi?id=51186
+
+        No new tests. Behaviour not changed, but need the asserts to detect when assumptions violated.
+
+        * platform/graphics/chromium/ImageLayerChromium.cpp:
+        (WebCore::ImageLayerChromium::updateContentsIfDirty):
+        * platform/graphics/skia/GraphicsContext3DSkia.cpp:
+        (WebCore::GraphicsContext3D::getImageData):
+
 2010-12-23  Lucas De Marchi  <lucas.demarchi at profusion.mobi>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp b/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
index cd299c1..186d922 100644
--- a/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
@@ -119,6 +119,9 @@ void ImageLayerChromium::updateContentsIfDirty()
     // FIXME: do we need to support more image configurations?
     if (skiaConfig == SkBitmap::kARGB_8888_Config)
         pixels = skiaBitmap->getPixels();
+    // Since this operation requires contiguous pixels, make sure there's no padding at the
+    // end of each line.
+    ASSERT(!pixels || skiaBitmap->rowBytes() == SkBitmap::ComputeRowBytes(skiaConfig, skiaBitmap->width()));
 #elif PLATFORM(CG)
     // FIXME: we should get rid of this temporary copy where possible.
     int tempRowBytes = width * 4;
diff --git a/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
index 8b7ac86..7fd7c70 100644
--- a/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
@@ -78,7 +78,8 @@ bool GraphicsContext3D::getImageData(Image* image,
         return false;
     SkBitmap& skiaImageRef = *skiaImage;
     SkAutoLockPixels lock(skiaImageRef);
-    ASSERT(skiaImage->rowBytes() == skiaImage->width() * 4);
+    ASSERT(skiaImage->bytesPerPixel() == 4
+           && skiaImage->rowBytes() == SkBitmap::ComputeRowBytes(skiaImage->config(), skiaImage->width()));
     outputVector.resize(skiaImage->rowBytes() * skiaImage->height());
     return packPixels(reinterpret_cast<const uint8_t*>(skiaImage->getPixels()),
                       SourceFormatBGRA8, skiaImage->width(), skiaImage->height(), 0,
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 335732a..86d9d76 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-23  W. James MacLean  <wjmaclean at chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        [chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
+        https://bugs.webkit.org/show_bug.cgi?id=51186
+
+        Add asserts to detect if assumptions (about contiguous pixels in Skia bitmaps) are violated.
+
+        * src/GraphicsContext3DChromium.cpp:
+        (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
+
 2010-12-22  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r74503.
diff --git a/WebKit/chromium/src/GraphicsContext3DChromium.cpp b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
index 2dff52b..6a0c672 100644
--- a/WebKit/chromium/src/GraphicsContext3DChromium.cpp
+++ b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
@@ -172,9 +172,13 @@ void GraphicsContext3DInternal::paintRenderingResultsToCanvas(CanvasRenderingCon
     const SkBitmap* canvasBitmap = imageBuffer->context()->platformContext()->bitmap();
     const SkBitmap* readbackBitmap = 0;
     ASSERT(canvasBitmap->config() == SkBitmap::kARGB_8888_Config);
+    ASSERT(SkBitmap::ComputeBytesPerPixel(canvasBitmap->config()) == 4);
     if (canvasBitmap->width() == m_impl->width() && canvasBitmap->height() == m_impl->height()) {
         // This is the fastest and most common case. We read back
         // directly into the canvas's backing store.
+        // Make sure no extra padding at line ends (e.g. a bitmap extracted subset).
+        ASSERT(readbackBitmap->rowBytes() ==
+               SkBitmap::ComputeRowBytes(readbackBitmap->config(), readbackBitmap->width()));
         readbackBitmap = canvasBitmap;
         m_resizingBitmap.reset();
     } else {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list