Title: [127294] trunk/Source/WebCore
Revision
127294
Author
[email protected]
Date
2012-08-31 11:24:26 -0700 (Fri, 31 Aug 2012)

Log Message

[chromium] Layout tests svg-filters.html and alpha.html are crashing intermittently
https://bugs.webkit.org/show_bug.cgi?id=92660

Reviewed by James Robinson.

We use two GL contexts to create and upload tile textures.
One context creates the texture, while another uploads it.
Even though the texture is shared by the two contexts, it is not
available to the uploading context immediately after creation,
unless the creating context is flushed.

* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::createAcceleratedCanvas):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (127293 => 127294)


--- trunk/Source/WebCore/ChangeLog	2012-08-31 18:22:01 UTC (rev 127293)
+++ trunk/Source/WebCore/ChangeLog	2012-08-31 18:24:26 UTC (rev 127294)
@@ -1,3 +1,20 @@
+2012-08-31  Alok Priyadarshi  <[email protected]>
+
+        [chromium] Layout tests svg-filters.html and alpha.html are crashing intermittently
+        https://bugs.webkit.org/show_bug.cgi?id=92660
+
+        Reviewed by James Robinson.
+
+        We use two GL contexts to create and upload tile textures.
+        One context creates the texture, while another uploads it.
+        Even though the texture is shared by the two contexts, it is not
+        available to the uploading context immediately after creation,
+        unless the creating context is flushed. 
+
+        * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
+        (WebCore::createAcceleratedCanvas):
+        (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
+
 2012-08-31  David Hyatt  <[email protected]>
 
         [New Multicolumn] Refactor flow thread repainting.

Modified: trunk/Source/WebCore/platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp (127293 => 127294)


--- trunk/Source/WebCore/platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp	2012-08-31 18:22:01 UTC (rev 127293)
+++ trunk/Source/WebCore/platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp	2012-08-31 18:24:26 UTC (rev 127294)
@@ -103,11 +103,16 @@
 
 void FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect(WebGraphicsContext3D* context, GrContext* grContext, CCResourceProvider* resourceProvider, CCPrioritizedTexture* texture, const IntRect& sourceRect, const IntSize& destOffset)
 {
+    texture->acquireBackingTexture(resourceProvider);
+    // Flush the context in which the backing texture is created so that it
+    // is available in other shared contexts. It is important to do here
+    // because the backing texture is created in one context while it is
+    // being written to in another.
+    resourceProvider->flush();
+    CCResourceProvider::ScopedWriteLockGL lock(resourceProvider, texture->resourceId());
+
     // Make sure ganesh uses the correct GL context.
     context->makeContextCurrent();
-
-    texture->acquireBackingTexture(resourceProvider);
-    CCResourceProvider::ScopedWriteLockGL lock(resourceProvider, texture->resourceId());
     // Create an accelerated canvas to draw on.
     OwnPtr<SkCanvas> canvas = createAcceleratedCanvas(grContext, texture->size(), lock.textureId());
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to