[iOS] Throttle painting using a UI-process-side CADisplayLink
https://bugs.webkit.org/show_bug.cgi?id=134879
<rdar://problem/
17641699>
Reviewed by Simon Fraser.
Just waiting for CA to commit is insufficient to actually throttle to 60fps,
because nothing will block the main runloop from spinning.
Instead, listen to a CADisplayLink, and send didUpdate to the WebProcess
the first time it fires after we commit. This is not a guarantee that
our content is on the screen, but we don't have any way to make that guarantee yet.
This will throttle painting, rAF, etc. to the display refresh rate.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(-[OneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
(-[OneShotDisplayLinkHandler dealloc]):
(-[OneShotDisplayLinkHandler displayLinkFired:]):
(-[OneShotDisplayLinkHandler invalidate]):
(-[OneShotDisplayLinkHandler schedule]):
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171068
268f45cc-cd09-0410-ab3c-
d52691b4dbfc