Title: [270599] trunk/Source/WebKit
Revision
270599
Author
wenson_hs...@apple.com
Date
2020-12-09 13:38:56 -0800 (Wed, 09 Dec 2020)

Log Message

Some WebGL tests crash in WebKit::RemoteRenderingBackendProxy::willAppendItem(WebCore::RenderingResourceIdentifier)
https://bugs.webkit.org/show_bug.cgi?id=219700

Reviewed by Tim Horton.

Fixes these assertions by resetting the identifier of the "most recently appended" image buffer
(m_currentDestinationImageBufferIdentifier) when the image buffer is released in the rendering
backend. We keep track of this so that we can append MetaCommandChangeDestinationImageBuffer
items when painting into multiple image buffers; the code to do this in willAppendItem is
actually robust against the case where m_currentDestinationImageBufferIdentifier is unknown,
but still debug asserts.

* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::releaseRemoteResource):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (270598 => 270599)


--- trunk/Source/WebKit/ChangeLog	2020-12-09 21:24:40 UTC (rev 270598)
+++ trunk/Source/WebKit/ChangeLog	2020-12-09 21:38:56 UTC (rev 270599)
@@ -1,3 +1,20 @@
+2020-12-09  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Some WebGL tests crash in WebKit::RemoteRenderingBackendProxy::willAppendItem(WebCore::RenderingResourceIdentifier)
+        https://bugs.webkit.org/show_bug.cgi?id=219700
+
+        Reviewed by Tim Horton.
+
+        Fixes these assertions by resetting the identifier of the "most recently appended" image buffer
+        (m_currentDestinationImageBufferIdentifier) when the image buffer is released in the rendering
+        backend. We keep track of this so that we can append MetaCommandChangeDestinationImageBuffer
+        items when painting into multiple image buffers; the code to do this in willAppendItem is
+        actually robust against the case where m_currentDestinationImageBufferIdentifier is unknown,
+        but still debug asserts.
+
+        * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
+        (WebKit::RemoteRenderingBackendProxy::releaseRemoteResource):
+
 2020-12-09  Alex Christensen  <achristen...@webkit.org>
 
         Fix clicking on links in PDFs on Big Sur after r266654

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp (270598 => 270599)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp	2020-12-09 21:24:40 UTC (rev 270598)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp	2020-12-09 21:38:56 UTC (rev 270599)
@@ -156,6 +156,9 @@
 
 void RemoteRenderingBackendProxy::releaseRemoteResource(RenderingResourceIdentifier renderingResourceIdentifier)
 {
+    if (renderingResourceIdentifier == m_currentDestinationImageBufferIdentifier)
+        m_currentDestinationImageBufferIdentifier = WTF::nullopt;
+
     send(Messages::RemoteRenderingBackend::ReleaseRemoteResource(renderingResourceIdentifier), m_renderingBackendIdentifier);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to