Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement AnimationFrameProvider for DedicatedWorkerGlobalScope #24277
Comments
|
The interesting question is how to communicate between the compositor and a dedicated worker to trigger the animation callbacks. Currently the constellation is not aware of such workers, which are "hidden" behind an We could have the script-thread forward the messages to the worker, and that might defeat the purpose of having the worker operate on an offscreen canvas independently from the "potentially janky JS main-thread"(effectively the script-thread), so we might want to add some plumbing so the worker can receive messages from the constellation/compositor directly and the rendering workflow is isolated from the script-thread. I guess that might also mean having a direct sender from the worker to the relevant layout thread to trigger reflows? Or is that not relevant if the worker is only manipulating an |
Spec: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animationframeprovider
See the
Windowwebidl for an example:servo/components/script/dom/webidls/Window.webidl
Line 63 in 6ca62aa
Relevant once we have #24276