Title: [280672] trunk/Source/WebKit
Revision
280672
Author
timothy_hor...@apple.com
Date
2021-08-04 16:55:13 -0700 (Wed, 04 Aug 2021)

Log Message

Bifurcated RemoteLayerBackingStore zooms in every time it repaints
https://bugs.webkit.org/show_bug.cgi?id=228798

Reviewed by Sam Weinig.

* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
If applying the scale/flip workaround manually, we need to save the
GraphicsContext state, or it leaks between paints.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (280671 => 280672)


--- trunk/Source/WebKit/ChangeLog	2021-08-04 23:53:55 UTC (rev 280671)
+++ trunk/Source/WebKit/ChangeLog	2021-08-04 23:55:13 UTC (rev 280672)
@@ -1,3 +1,15 @@
+2021-08-04  Tim Horton  <timothy_hor...@apple.com>
+
+        Bifurcated RemoteLayerBackingStore zooms in every time it repaints
+        https://bugs.webkit.org/show_bug.cgi?id=228798
+
+        Reviewed by Sam Weinig.
+
+        * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
+        (WebKit::RemoteLayerBackingStore::display):
+        If applying the scale/flip workaround manually, we need to save the
+        GraphicsContext state, or it leaks between paints.
+
 2021-08-04  Jean-Yves Avenard  <j...@apple.com>
 
         Use Observer in place of VideoFullscreenManagerProxyClient

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm (280671 => 280672)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm	2021-08-04 23:53:55 UTC (rev 280671)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm	2021-08-04 23:55:13 UTC (rev 280672)
@@ -287,11 +287,13 @@
 
         // FIXME: Remove this when <rdar://problem/80487697> is fixed.
         static std::optional<bool> needsMissingFlipWorkaround;
+        WebCore::GraphicsContextStateSaver workaroundStateSaver(displayListContext, false);
         if (!needsMissingFlipWorkaround) {
             id defaultValue = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitNeedsWorkaroundFor80487697"];
             needsMissingFlipWorkaround = defaultValue ? [defaultValue boolValue] : true;
         }
         if (needsMissingFlipWorkaround.value()) {
+            workaroundStateSaver.save();
             displayListContext.scale(WebCore::FloatSize(m_scale, -m_scale));
             displayListContext.translate(0, -m_size.height());
         }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to