Title: [273543] trunk/Source/WebKit
- Revision
- 273543
- Author
- timothy_hor...@apple.com
- Date
- 2021-02-26 01:04:13 -0800 (Fri, 26 Feb 2021)
Log Message
REGRESSION (r269824): macCatalyst WKWebView shows chunks of other tiles in the middle of content
https://bugs.webkit.org/show_bug.cgi?id=222460
<rdar://problem/74102753>
Reviewed by Simon Fraser.
* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
Reinstate some code that was accidentally deleted in r269824 that ensures
that we do not use an in-use IOSurface as our front buffer, so that
we don't paint into it while it's being composited in the render server.
Also, add some comments, since this code is all a little confusing
with its fronts and backs.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (273542 => 273543)
--- trunk/Source/WebKit/ChangeLog 2021-02-26 06:43:34 UTC (rev 273542)
+++ trunk/Source/WebKit/ChangeLog 2021-02-26 09:04:13 UTC (rev 273543)
@@ -1,3 +1,20 @@
+2021-02-26 Tim Horton <timothy_hor...@apple.com>
+
+ REGRESSION (r269824): macCatalyst WKWebView shows chunks of other tiles in the middle of content
+ https://bugs.webkit.org/show_bug.cgi?id=222460
+ <rdar://problem/74102753>
+
+ Reviewed by Simon Fraser.
+
+ * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
+ (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
+ Reinstate some code that was accidentally deleted in r269824 that ensures
+ that we do not use an in-use IOSurface as our front buffer, so that
+ we don't paint into it while it's being composited in the render server.
+
+ Also, add some comments, since this code is all a little confusing
+ with its fronts and backs.
+
2021-02-25 Brent Fulgham <bfulg...@apple.com>
Serialize NSURLRequest (rather than CFURLRequest) in IPC
Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm (273542 => 273543)
--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm 2021-02-26 06:43:34 UTC (rev 273542)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm 2021-02-26 09:04:13 UTC (rev 273543)
@@ -175,6 +175,21 @@
void RemoteLayerBackingStore::swapToValidFrontBuffer()
{
+ // Sometimes, we can get two swaps ahead of the render server.
+ // If we're using shared IOSurfaces, we must wait to modify
+ // a surface until it no longer has outstanding clients.
+ if (m_acceleratesDrawing) {
+ if (!m_backBuffer.imageBuffer || m_backBuffer.imageBuffer->isInUse()) {
+ std::swap(m_backBuffer, m_secondaryBackBuffer);
+
+ // When pulling the secondary back buffer out of hibernation (to become
+ // the new front buffer), if it is somehow still in use (e.g. we got
+ // three swaps ahead of the render server), just give up and discard it.
+ if (m_backBuffer.imageBuffer && m_backBuffer.imageBuffer->isInUse())
+ m_backBuffer.discard();
+ }
+ }
+
std::swap(m_frontBuffer, m_backBuffer);
if (m_frontBuffer.imageBuffer)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes