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

thakis at chromium.org thakis at chromium.org
Wed Dec 22 13:11:06 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 817747fcdd5bcf85948df93193b2d5eb2848cd0f
Author: thakis at chromium.org <thakis at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 8 13:02:16 2010 +0000

    2010-09-08  Nico Weber  <thakis at chromium.org>
    
            Reviewed by Kenneth Russell.
    
            chromium/mac: Fix crash with compositor due to missing current NSGraphicsContext
            https://bugs.webkit.org/show_bug.cgi?id=45354
    
            * platform/graphics/chromium/ContentLayerChromium.cpp:
            (WebCore::ContentLayerChromium::updateContents): Set a current local context.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66975 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 84c76b5..90bfb3a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-08  Nico Weber  <thakis at chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        chromium/mac: Fix crash with compositor due to missing current NSGraphicsContext
+        https://bugs.webkit.org/show_bug.cgi?id=45354
+
+        * platform/graphics/chromium/ContentLayerChromium.cpp:
+        (WebCore::ContentLayerChromium::updateContents): Set a current local context.
+
 2010-09-08  Justin Schuh  <jschuh at chromium.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp b/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
index 974933d..5c8b869 100644
--- a/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
@@ -42,6 +42,8 @@
 #include "PlatformContextSkia.h"
 #include "skia/ext/platform_canvas.h"
 #elif PLATFORM(CG)
+#include "LocalCurrentGraphicsContext.h"
+
 #include <CoreGraphics/CGBitmapContext.h>
 #endif
 
@@ -152,12 +154,6 @@ void ContentLayerChromium::updateContents()
     IntSize requiredTextureSize;
     IntSize bitmapSize;
 
-#if PLATFORM(SKIA)
-    const SkBitmap* skiaBitmap = 0;
-    OwnPtr<skia::PlatformCanvas> canvas;
-    OwnPtr<PlatformContextSkia> skiaContext;
-    OwnPtr<GraphicsContext> graphicsContext;
-
     requiredTextureSize = m_bounds;
     IntRect boundsRect(IntPoint(0, 0), m_bounds);
 
@@ -171,6 +167,12 @@ void ContentLayerChromium::updateContents()
         dirtyRect.intersect(boundsRect);
     }
 
+#if PLATFORM(SKIA)
+    const SkBitmap* skiaBitmap = 0;
+    OwnPtr<skia::PlatformCanvas> canvas;
+    OwnPtr<PlatformContextSkia> skiaContext;
+    OwnPtr<GraphicsContext> graphicsContext;
+
     canvas.set(new skia::PlatformCanvas(dirtyRect.width(), dirtyRect.height(), false));
     skiaContext.set(new PlatformContextSkia(canvas.get()));
 
@@ -201,19 +203,6 @@ void ContentLayerChromium::updateContents()
         bitmapSize = IntSize(skiaBitmap->width(), skiaBitmap->height());
     }
 #elif PLATFORM(CG)
-    requiredTextureSize = m_bounds;
-    IntRect boundsRect(IntPoint(0, 0), m_bounds);
-
-    // If the texture needs to be reallocated then we must redraw the entire
-    // contents of the layer.
-    if (requiredTextureSize != m_allocatedTextureSize)
-        dirtyRect = boundsRect;
-    else {
-        // Clip the dirtyRect to the size of the layer to avoid drawing outside
-        // the bounds of the backing texture.
-        dirtyRect.intersect(boundsRect);
-    }
-
     Vector<uint8_t> tempVector;
     int rowBytes = 4 * dirtyRect.width();
     tempVector.resize(rowBytes * dirtyRect.height());
@@ -225,6 +214,7 @@ void ContentLayerChromium::updateContents()
                                                                      kCGImageAlphaPremultipliedLast));
 
     GraphicsContext graphicsContext(contextCG.get());
+    LocalCurrentGraphicsContext scopedNSGraphicsContext(&graphicsContext);
 
     // Translate the graphics contxt into the coordinate system of the dirty rect.
     graphicsContext.translate(-dirtyRect.x(), -dirtyRect.y());

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list