Title: [287995] trunk/Source/WebKit
Revision
287995
Author
[email protected]
Date
2022-01-13 15:04:00 -0800 (Thu, 13 Jan 2022)

Log Message

Avoid unnecessary call to windowScreenDidChange
https://bugs.webkit.org/show_bug.cgi?id=235198
<rdar://87458502>

Reviewed by Geoffrey Garen.

It is a page load performance progression to avoid this call in initWithDrawingAreaProxy.

* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(-[WKOneShotDisplayLinkHandler initWithDrawingAreaProxy:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (287994 => 287995)


--- trunk/Source/WebKit/ChangeLog	2022-01-13 22:45:11 UTC (rev 287994)
+++ trunk/Source/WebKit/ChangeLog	2022-01-13 23:04:00 UTC (rev 287995)
@@ -1,5 +1,18 @@
 2022-01-13  Per Arne Vollan  <[email protected]>
 
+        Avoid unnecessary call to windowScreenDidChange
+        https://bugs.webkit.org/show_bug.cgi?id=235198
+        <rdar://87458502>
+
+        Reviewed by Geoffrey Garen.
+
+        It is a page load performance progression to avoid this call in initWithDrawingAreaProxy.
+
+        * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
+        (-[WKOneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
+
+2022-01-13  Per Arne Vollan  <[email protected]>
+
         [iOS][Networking] Add access to required network service
         https://bugs.webkit.org/show_bug.cgi?id=235188
         <rdar://86781432>

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm (287994 => 287995)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm	2022-01-13 22:45:11 UTC (rev 287994)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm	2022-01-13 23:04:00 UTC (rev 287995)
@@ -71,12 +71,14 @@
         _displayLink.preferredFramesPerSecond = 60;
 
         if (drawingAreaProxy) {
-            auto minimumRefreshInterval = _displayLink.maximumRefreshRate;
-            if (minimumRefreshInterval > 0) {
-                auto& page = drawingAreaProxy->page();
-                if (auto displayId = page.displayId()) {
-                    WebCore::FramesPerSecond frameRate = std::round(1.0 / minimumRefreshInterval);
-                    page.windowScreenDidChange(*displayId, frameRate);
+            auto& page = drawingAreaProxy->page();
+            if (page.preferences().webAnimationsCustomFrameRateEnabled()) {
+                auto minimumRefreshInterval = _displayLink.maximumRefreshRate;
+                if (minimumRefreshInterval > 0) {
+                    if (auto displayId = page.displayId()) {
+                        WebCore::FramesPerSecond frameRate = std::round(1.0 / minimumRefreshInterval);
+                        page.windowScreenDidChange(*displayId, frameRate);
+                    }
                 }
             }
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to