Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7f170efe52d7a390011fb9434c7c7f220ceb03e4
      
https://github.com/WebKit/WebKit/commit/7f170efe52d7a390011fb9434c7c7f220ceb03e4
  Author: Matt Woodrow <mattwood...@apple.com>
  Date:   2023-05-25 (Thu, 25 May 2023)

  Changed paths:
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h
    M 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
    M 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm

  Log Message:
  -----------
  The first RemoteLayerTreeDrawingAreaProxy::commitLayerTree after being idle 
is always considered 'missed'.
https://bugs.webkit.org/show_bug.cgi?id=257005
<rdar://problem/109543927>

Reviewed by Simon Fraser.

 Each RemoteLayerTreeDrawingAreaProxy::commitLayerTree IPC messages results in 
a reply displayDidRefresh message being sent back to the WebProcess (once the 
display link fires) to trigger the next rendering update.

If the next commitLayerTree isn't received before the following display link 
callback, it goes into a 'missed commit' state, assuming the rendering update 
took more than one interval to render. In missed commit state, when the 
commitLayerTree eventually arrives, the displayDidRefresh reply is sent 
immediately, rather than waiting for the next display link callback.

This can't differentiate between a slow rendering update, and an idle 
WebContent process that decided it didn't need to do a rendering update at all. 
When we do resume from idle, we'll always be in missed commit state, and do a 
second rendering update (attempt) immediately, for no real benefit.

This patch adds a new 'commitLayerTreeNotTriggered' message so the WebContent 
process can notify the UI process that it isn't going to do a rendering update, 
and to go into an idle state.
It also renames DidUpdateMessageState a bit to more accurately match the IPC 
message/function names that are being waited on.

* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
* 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTreeNotTriggered):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTreeTransaction):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
* 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::displayDidRefresh):

Canonical link: https://commits.webkit.org/264538@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to