Title: [201929] trunk/Source/WebKit2
- Revision
- 201929
- Author
- [email protected]
- Date
- 2016-06-10 11:01:54 -0700 (Fri, 10 Jun 2016)
Log Message
[iOS WK2] Rare RELEASE_ASSERT under RemoteLayerTreeDrawingArea::flushLayers()
https://bugs.webkit.org/show_bug.cgi?id=158622
rdar://problem/26609452
Reviewed by Tim Horton.
It's possible for a CADisplayLink to fire after being paused sometimes, possibly
when an app is running another CADisplayLink whose callback takes some time. When
this happens, RemoteLayerTreeDrawingAreaProxy could erroneously send a second
didUpdate() to the web process between commits, which would clear the m_waitingForBackingStoreSwap
flag too early, and allow a subsequent RemoteLayerTreeDrawingArea::flushLayers()
to proceed when the m_pendingBackingStoreFlusher was still flushing.
Fix by preventing two didUpdates from being sent from the UI process between
commits.
Not easily testable.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (201928 => 201929)
--- trunk/Source/WebKit2/ChangeLog 2016-06-10 17:04:11 UTC (rev 201928)
+++ trunk/Source/WebKit2/ChangeLog 2016-06-10 18:01:54 UTC (rev 201929)
@@ -1,3 +1,28 @@
+2016-06-10 Simon Fraser <[email protected]>
+
+ [iOS WK2] Rare RELEASE_ASSERT under RemoteLayerTreeDrawingArea::flushLayers()
+ https://bugs.webkit.org/show_bug.cgi?id=158622
+ rdar://problem/26609452
+
+ Reviewed by Tim Horton.
+
+ It's possible for a CADisplayLink to fire after being paused sometimes, possibly
+ when an app is running another CADisplayLink whose callback takes some time. When
+ this happens, RemoteLayerTreeDrawingAreaProxy could erroneously send a second
+ didUpdate() to the web process between commits, which would clear the m_waitingForBackingStoreSwap
+ flag too early, and allow a subsequent RemoteLayerTreeDrawingArea::flushLayers()
+ to proceed when the m_pendingBackingStoreFlusher was still flushing.
+
+ Fix by preventing two didUpdates from being sent from the UI process between
+ commits.
+
+ Not easily testable.
+
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
+
2016-06-10 Carlos Garcia Campos <[email protected]>
[Threaded Compositor] Content and viewport sizes are mixed
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h (201928 => 201929)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h 2016-06-10 17:04:11 UTC (rev 201928)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h 2016-06-10 18:01:54 UTC (rev 201929)
@@ -91,6 +91,7 @@
RemoteLayerTreeHost m_remoteLayerTreeHost;
bool m_isWaitingForDidUpdateGeometry { false };
+ bool m_haveSentDidUpdateSinceLastCommit { false };
WebCore::IntSize m_lastSentSize;
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (201928 => 201929)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm 2016-06-10 17:04:11 UTC (rev 201928)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm 2016-06-10 18:01:54 UTC (rev 201929)
@@ -219,6 +219,8 @@
m_webPageProxy.layerTreeCommitComplete();
+ m_haveSentDidUpdateSinceLastCommit = false;
+
#if PLATFORM(IOS)
[m_displayLinkHandler schedule];
#else
@@ -389,6 +391,11 @@
if (!m_webPageProxy.isValid())
return;
+ if (m_haveSentDidUpdateSinceLastCommit)
+ return;
+
+ m_haveSentDidUpdateSinceLastCommit = true;
+
// Waiting for CA to commit is insufficient, because the render server can still be
// using our backing store. We can improve this by waiting for the render server to commit
// if we find API to do so, but for now we will make extra buffers if need be.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes