[iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 May 2014 00:53:31 +0000 (00:53 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 May 2014 00:53:31 +0000 (00:53 +0000)
commiteca79ca3e728d77381fc2c3885faaa2d6feff12d
treec11cec60e4aa7e1731d63338a6790e6f9a70c0b0
parent8edaacef1f3c63e7fbb30b1a85ced3e53c782a5b
[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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm