Re: [css3-transitions] Frame Rate

On Sat, Sep 29, 2012 at 9:57 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 9/29/12 12:52 PM, Rik Cabanier wrote:
>
>> Is this 60fps defined in a spec, or is it just accepted practice?
>>
>
> The latter.  Though in many cases I think it's a consequence of tying the
> animation to vsync and the fact that most LCD panels go at 60Hz.
>
>  The flash player allows setting of the frame rate and this is a
>> _*guaranteed*_ number of frames per second. This means that if a script
>>
>> or an animation takes too long, the animation will start skipping frames
>> so things stay in perfect sync (ie if you want to sync audio or video
>> with an animation) but scripts will still run.
>> The event model in browsers is not compatible with this so we'd need a
>> major architecture change if this should be added.
>>
>
> I'm not sure what about browsers is incompatible with this.  I thought the
> whole point of requestAnimationFrame and declarative animations was to
> allow frame skipping as needed in the face of limited compute resources!
>
> Yes, and that's a problem.If 2 animations run in a page with
requestanimationframe, they will each run a 30fps.
If there is a lot of event handling, that rate will go down even more.

In Flash, if you have a callback that is for each frame and the movie
starts falling behind and skip frames, the callback will still be called as
if the frame rate is uninterrupted.

Rik

Received on Saturday, 29 September 2012 17:10:21 UTC