[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

senorblanco at chromium.org senorblanco at chromium.org
Wed Dec 22 12:21:04 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 243caa23aca2be77e7244fc8abc0e4a803d5f568
Author: senorblanco at chromium.org <senorblanco at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 19 21:13:15 2010 +0000

    2010-08-19  Stephen White  <senorblanco at chromium.org>
    
            Reviewed by Kenneth Russell.
    
            [CHROMIUM] Assert w/canvas image draw
            https://bugs.webkit.org/show_bug.cgi?id=44279
    
            Don't use bitmap->pixelRef()->getPixels() directly; prefer
            bitmap->pixels() and an SkAutoLockPixels.  Also, make sure to set
            the backing store state to Software when it was None.  This handles
            missing draws when the first call is software.  Finally, remove some
            spurious prepareForSoftwareDraw() calls in addPath() and beginPath().
            It's really the fillPath() or strokePath() that matters.
    
            Covered by LayoutTests/fast/canvas/arc360.html and others.
    
            * platform/graphics/skia/GraphicsContextSkia.cpp:
            (WebCore::GraphicsContext::addPath):
            (WebCore::GraphicsContext::beginPath):
            Remove spurious prepareForSoftwareDraw() calls.
            * platform/graphics/skia/ImageSkia.cpp:
            (WebCore::drawBitmapGLES2):
            Lock SkBitmap's pixels, and use ->getPixels().
            * platform/graphics/skia/PlatformContextSkia.cpp:
            (WebCore::PlatformContextSkia::prepareForSoftwareDraw):
            Switch backing store state to Software when it was None.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65700 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 66dfa59..a0875a8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2010-08-19  Stephen White  <senorblanco at chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        [CHROMIUM] Assert w/canvas image draw
+        https://bugs.webkit.org/show_bug.cgi?id=44279
+
+        Don't use bitmap->pixelRef()->getPixels() directly; prefer
+        bitmap->pixels() and an SkAutoLockPixels.  Also, make sure to set
+        the backing store state to Software when it was None.  This handles
+        missing draws when the first call is software.  Finally, remove some
+        spurious prepareForSoftwareDraw() calls in addPath() and beginPath().
+        It's really the fillPath() or strokePath() that matters.
+
+        Covered by LayoutTests/fast/canvas/arc360.html and others.
+
+        * platform/graphics/skia/GraphicsContextSkia.cpp:
+        (WebCore::GraphicsContext::addPath):
+        (WebCore::GraphicsContext::beginPath):
+        Remove spurious prepareForSoftwareDraw() calls.
+        * platform/graphics/skia/ImageSkia.cpp:
+        (WebCore::drawBitmapGLES2):
+        Lock SkBitmap's pixels, and use ->getPixels().
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (WebCore::PlatformContextSkia::prepareForSoftwareDraw):
+        Switch backing store state to Software when it was None.
+
 2010-08-19  David Kilzer  <ddkilzer at apple.com>
 
         <http://webkit.org/b/44285> Fix compilation with NETSCAPE_PLUGIN_API disabled
diff --git a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
index fe7f6ce..da687ba 100644
--- a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
@@ -323,7 +323,6 @@ void GraphicsContext::addPath(const Path& path)
 {
     if (paintingDisabled())
         return;
-    platformContext()->prepareForSoftwareDraw();
     platformContext()->addPath(*path.platformPath());
 }
 
@@ -331,7 +330,6 @@ void GraphicsContext::beginPath()
 {
     if (paintingDisabled())
         return;
-    platformContext()->prepareForSoftwareDraw();
     platformContext()->beginPath();
 }
 
diff --git a/WebCore/platform/graphics/skia/ImageSkia.cpp b/WebCore/platform/graphics/skia/ImageSkia.cpp
index 6bbad5e..1ff87cc 100644
--- a/WebCore/platform/graphics/skia/ImageSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageSkia.cpp
@@ -419,8 +419,9 @@ static void drawBitmapGLES2(GraphicsContext* ctxt, NativeImageSkia* bitmap, cons
         ASSERT(bitmap->config() == SkBitmap::kARGB_8888_Config);
         ASSERT(bitmap->rowBytes() == bitmap->width() * 4);
         texture = gpuCanvas->createTexture(bitmap, GLES2Texture::BGRA8, bitmap->width(), bitmap->height());
-        ASSERT(bitmap->pixelRef());
-        texture->load(bitmap->pixelRef()->pixels());
+        SkAutoLockPixels lock(*bitmap);
+        ASSERT(bitmap->getPixels());
+        texture->load(bitmap->getPixels());
     }
     gpuCanvas->drawTexturedRect(texture, srcRect, dstRect, styleColorSpace, compositeOp);
 }
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index 1161224..737323b 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -753,6 +753,8 @@ void PlatformContextSkia::prepareForSoftwareDraw() const
             readbackHardwareToSoftware();
             m_backingStoreState = Software;
         }
+    } else if (m_backingStoreState == None) {
+        m_backingStoreState = Software;
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list