[Webkit-unassigned] [Bug 173434] Support for 120Hz requestAnimationFrame

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 3 01:22:13 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=173434

--- Comment #23 from mdrejhon <mark at blurbusters.com> ---
T(In reply to Simon Fraser (smfr) from comment #22)
> > requestAnimationFrame() provides such information, while Web Animation API does not.
> 
> I'm curious about this claim. How does requestAnimationFrame() provide this
> information? According to the HTML spec
> [https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-
> processing-model] both requestAnimationFrame() and Web Animations use the
> same `now` timestamp.

For requestAnimationFrame(), the per-frame realtime timestamp workflow is:

1. Provide a callback function to requestAnimationFrame()

2. The callback function provides an extremely accurate refresh cycle timestamp.

These timestamps usable for detecting framedrops in FireFox and Chromium engines.  So if an animation runs only 119 frames per second at 120Hz, it is called 119 times per second.  

Collecting the timestamps show an obvious two-refresh-cycle gap (2/120sec), which allows me to detect single dropped frames instantly (in order to invalidate scientific tests)

There is no equivalent functionality I can find in Web Animation API that provides per-frame timestamps of visible frame presentation in real-time.  

If this is not documented, the Web Animation API specification need to be updated to be more clear of the existence of this functionality -- but as far as it reads, there is no similar functionality available.

A longer explanation of why Web Animation API does not yet replace requestAnimationFrame() for TestUFO needs is at:
https://github.com/WebKit/explainers/issues/85#issuecomment-1203341375

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220803/2bc0ada9/attachment.htm>


More information about the webkit-unassigned mailing list