Bug 257295 - Add API to EventDispatcher to observing displayDidRefresh on a background thread
Summary: Add API to EventDispatcher to observing displayDidRefresh on a background thread
Status: NEW
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: 232918
  Show dependency treegraph
 
Reported: 2023-05-24 17:34 PDT by Matt Woodrow
Modified: 2023-05-24 17:45 PDT (History)
4 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-24 17:34:03 PDT
In order to deliver displayDidRefresh for WorkerThread requestAnimationFrame, we want a version of displayDidRefresh/DisplayRefreshMonitor that allows notifications without blocking on the main thread. We also likely want to match whatever framerate/throttling the underlying WebCore::Page is using, so that we slow down when hidden etc.

DisplayRefreshMonitor is heavily hardcoded towards using the main thread, so I think the easiest thing to do is add an API to EventDispatcher which handles this.
Comment 1 Radar WebKit Bug Importer 2023-05-24 17:36:55 PDT
<rdar://problem/109804872>
Comment 2 Matt Woodrow 2023-05-24 17:45:44 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14318