W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: requestAnimationFrame

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 16 Nov 2010 11:08:04 -0800
Message-ID: <AANLkTimHs8_P1D+5-Eakix-dcrP77u6FVXD5spV1PUph@mail.gmail.com>
To: "Gregg Tavares (wrk)" <gman@google.com>
Cc: robert@ocallahan.org, Boris Zbarsky <bzbarsky@mit.edu>, "public-webapps@w3.org" <public-webapps@w3.org>
On Tue, Nov 16, 2010 at 10:52 AM, Gregg Tavares (wrk) <gman@google.com> wrote:
> On Mon, Nov 15, 2010 at 7:24 PM, Robert O'Callahan <robert@ocallahan.org>
> wrote:
>> Now, when animation is happening on a separate compositor thread that
>> guarantee has to be relaxed a bit. But we'll still try to meet it on a
>> best-effort basis --- i.e. "we'll run the JS animations once per composited
>> frame, if the JS can keep up".
>
> So you're saying that there's no guarantee that requestAnimationFrame will
> actually keep things in sync?

Right; if the browser is trying to paint animation frames every 20ms,
and two functions have both registered themselves for the next frame,
but the first function takes 50ms to run, then of course the second
one won't get to run at the same time.  It'll be delayed until the 3rd
frame after or so.

~TJ
Received on Tuesday, 16 November 2010 19:08:57 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:42 GMT