Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e85bed10ffa8086b32e83b3ddbfce028d22dcb67
https://github.com/WebKit/WebKit/commit/e85bed10ffa8086b32e83b3ddbfce028d22dcb67
Author: Matt Woodrow <[email protected]>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M Source/WebCore/page/Page.cpp
M Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.h
M Source/WebKit/UIProcess/DrawingAreaProxy.h
M
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeDrawingAreaProxyIOS.h
M
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeDrawingAreaProxyIOS.mm
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.h
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/ios/WKContentView.mm
M Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h
M Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
M
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h
M
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm
M Source/WebKitLegacy/mac/WebView/WebView.mm
Log Message:
-----------
RemoteLayerTreeDisplayRefreshMonitor::displayNominalFramesPerSecond returns
the preferred frames per secon
https://bugs.webkit.org/show_bug.cgi?id=257443
<rdar://problem/109953270>
Reviewed by Simon Fraser.
displayNominalFramesPerSecond is intended to return the refresh rate of the
display, but RemoteLayerTreeDisplayRefreshMonitor returns the preferred value
set by the Page.
This might be the nominal rate, but could also be a lower value if the Page
applied throttling.
The only caller of this function is Page, so it's a circular dependency, that
can't return any useful information.
I'm not aware of current bugs from this, but it seems plausible that we'd issue
a windowScreenDidChange on iOS, and retrieve a throttled rate from the existing
refresh monitor.
This change removes the callsite from Page, and moves the responsibility for
determining the nominal refresh rate to the (WebKit) callers of
windowScreenDidChange.
For RemoteLayerTree rendering, the WebPageProxy (in the UI process) now queries
the DrawingAreaProxy for the rate. Both mac and iOS implementations retrieve
the actual
nominal refresh rate from the display link.
iOS previously synthesized a second windowScreenDidChange message to override
the nominal rate when required by config settings, this is now removed as we
query the
desired rate correctly the first time.
The call to DisplayRefreshMonitorManager::normalFramesPerSecond is moved from
Page, into WebKitLegacy's WebView. This call was added specifically for WK1, and
the only useful implementation is LegacyDisplayRefreshMonitorMac, so moving it
into WK1 code makes it clearer where it's adding value.
* Source/WebCore/page/Page.cpp:
(WebCore::Page::windowScreenDidChange):
* Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.h:
* Source/WebKit/UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::windowScreenDidChange):
(WebKit::DrawingAreaProxy::displayNominalFramesPerSecond):
*
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeDrawingAreaProxyIOS.h:
*
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeDrawingAreaProxyIOS.mm:
(-[WKDisplayLinkHandler initWithDrawingAreaProxy:]):
(-[WKDisplayLinkHandler nominalFramesPerSecond]):
(WebKit::RemoteLayerTreeDrawingAreaProxyIOS::displayNominalFramesPerSecond):
*
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.h:
*
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxyMac::windowScreenDidChange):
(WebKit::RemoteLayerTreeDrawingAreaProxyMac::displayNominalFramesPerSecond):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::swapToProvisionalPage):
(WebKit::WebPageProxy::windowScreenDidChange):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
* Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::displayNominalFramesPerSecond):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::windowDidChangeScreen):
*
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h:
*
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::displayNominalFramesPerSecond):
Deleted.
* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView doWindowDidChangeScreen]):
Canonical link: https://commits.webkit.org/264775@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes