Bug 257005 - The first RemoteLayerTreeDrawingAreaProxy::commitLayerTree after being idle is always considered 'missed'.
Summary: The first RemoteLayerTreeDrawingAreaProxy::commitLayerTree after being idle i...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matt Woodrow
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-18 18:59 PDT by Matt Woodrow
Modified: 2023-05-25 14:17 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Woodrow 2023-05-18 18:59:53 PDT
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.
Comment 1 Radar WebKit Bug Importer 2023-05-18 19:00:14 PDT
<rdar://problem/109543927>
Comment 2 Matt Woodrow 2023-05-18 19:02:55 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14054
Comment 3 Matt Woodrow 2023-05-22 21:37:38 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14228
Comment 4 EWS 2023-05-25 14:17:13 PDT
Committed 264538@main (7f170efe52d7): <https://commits.webkit.org/264538@main>

Reviewed commits have been landed. Closing PR #14228 and removing active labels.