Title: [168589] trunk/Source/WebKit2
Revision
168589
Author
[email protected]
Date
2014-05-10 17:53:31 -0700 (Sat, 10 May 2014)

Log Message

[iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE_ASSERT in RemoteLayerTreeDrawingArea::flushLayers()
https://bugs.webkit.org/show_bug.cgi?id=132783
<rdar://problem/16877326>

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
There's a race window between the BackingStoreFlusher sending the new
layer tree to the UI process and updating m_hasFlushed where we can
get a reply back in (on the Web process main thread) from the UI process
that we committed the new layer tree (didUpdate).
This will cause the RELEASE_ASSERT in flushLayers() to fire incorrectly.
Since the RELEASE_ASSERT is there only to avoid painting garbage, move
our code to set m_hasFlushed=true to after we finish calling CGContextFlush
on all of the contexts, instead of after we send the layer tree commit message,
which will remove the race entirely.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (168588 => 168589)


--- trunk/Source/WebKit2/ChangeLog	2014-05-11 00:30:19 UTC (rev 168588)
+++ trunk/Source/WebKit2/ChangeLog	2014-05-11 00:53:31 UTC (rev 168589)
@@ -1,3 +1,23 @@
+2014-05-10  Tim Horton  <[email protected]>
+
+        [iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE_ASSERT in RemoteLayerTreeDrawingArea::flushLayers()
+        https://bugs.webkit.org/show_bug.cgi?id=132783
+        <rdar://problem/16877326>
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
+        There's a race window between the BackingStoreFlusher sending the new
+        layer tree to the UI process and updating m_hasFlushed where we can
+        get a reply back in (on the Web process main thread) from the UI process
+        that we committed the new layer tree (didUpdate).
+        This will cause the RELEASE_ASSERT in flushLayers() to fire incorrectly.
+        Since the RELEASE_ASSERT is there only to avoid painting garbage, move
+        our code to set m_hasFlushed=true to after we finish calling CGContextFlush
+        on all of the contexts, instead of after we send the layer tree commit message,
+        which will remove the race entirely.
+
 2014-05-10  Anders Carlsson  <[email protected]>
 
         ASSERTION FAILED: !m_connection under RunJavaScriptAlert

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (168588 => 168589)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm	2014-05-11 00:30:19 UTC (rev 168588)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm	2014-05-11 00:53:31 UTC (rev 168589)
@@ -336,9 +336,9 @@
 
     for (auto& context : m_contextsToFlush)
         CGContextFlush(context.get());
+    m_hasFlushed = true;
 
     m_connection->sendMessage(std::move(m_commitEncoder));
-    m_hasFlushed = true;
 }
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to