Title: [282639] trunk/Source/WebKit
Revision
282639
Author
[email protected]
Date
2021-09-17 00:46:20 -0700 (Fri, 17 Sep 2021)

Log Message

Replaying WKCGCommandsContext results in a doubly-scaled backing store
https://bugs.webkit.org/show_bug.cgi?id=230386

Reviewed by Wenson Hsieh.

* Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:
(WebKit::CGDisplayListImageBufferBackend::create):
* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
WKCGCommandsContextCreate() expects the bounds in logical coordinates, so
we don't need to use calculateBackendSize().
This also means that the workaround no longer needs to work around the
missing scale; only the flip is missing.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (282638 => 282639)


--- trunk/Source/WebKit/ChangeLog	2021-09-17 07:07:07 UTC (rev 282638)
+++ trunk/Source/WebKit/ChangeLog	2021-09-17 07:46:20 UTC (rev 282639)
@@ -1,3 +1,19 @@
+2021-09-17  Tim Horton  <[email protected]>
+
+        Replaying WKCGCommandsContext results in a doubly-scaled backing store
+        https://bugs.webkit.org/show_bug.cgi?id=230386
+
+        Reviewed by Wenson Hsieh.
+
+        * Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:
+        (WebKit::CGDisplayListImageBufferBackend::create):
+        * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
+        (WebKit::RemoteLayerBackingStore::display):
+        WKCGCommandsContextCreate() expects the bounds in logical coordinates, so
+        we don't need to use calculateBackendSize().
+        This also means that the workaround no longer needs to work around the
+        missing scale; only the flip is missing.
+
 2021-09-16  Youenn Fablet  <[email protected]>
 
         Make WebProcess use a RefPtr of LibWebRTCNetwork

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp (282638 => 282639)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp	2021-09-17 07:07:07 UTC (rev 282638)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp	2021-09-17 07:46:20 UTC (rev 282639)
@@ -47,11 +47,11 @@
 
 std::unique_ptr<CGDisplayListImageBufferBackend> CGDisplayListImageBufferBackend::create(const Parameters& parameters)
 {
-    auto backendSize = calculateBackendSize(parameters);
-    if (backendSize.isEmpty())
+    auto logicalSize = parameters.logicalSize;
+    if (logicalSize.isEmpty())
         return nullptr;
 
-    auto cgContext = adoptCF(WKCGCommandsContextCreate(backendSize, nullptr));
+    auto cgContext = adoptCF(WKCGCommandsContextCreate(logicalSize, nullptr));
     if (!cgContext)
         return nullptr;
 

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm (282638 => 282639)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm	2021-09-17 07:07:07 UTC (rev 282638)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm	2021-09-17 07:46:20 UTC (rev 282639)
@@ -294,7 +294,7 @@
         }
         if (needsMissingFlipWorkaround.value()) {
             workaroundStateSaver.save();
-            displayListContext.scale(WebCore::FloatSize(m_scale, -m_scale));
+            displayListContext.scale(WebCore::FloatSize(1, -1));
             displayListContext.translate(0, -m_size.height());
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to