Re: [web-animations] does rescheduling create pending task?

Hi Glen,

On Mon, Mar 16, 2015 at 5:23 PM, Glen Huang <> wrote:

> When setting the target effect of an animation, the spec says if animation
> has a pending task, it should be rescheduled to run as soon as the
> animation is ready. My question is, after the rescheduling, should the
> animation still be considered as having a pending task?

The intention there is simply that if, for example, the implementation
finished uploading the first frame of the old effect to the compositor and
is about to resolve the ready promise when the target effect it changed, it
should defer doing that and wait until it has uploaded the (now updated)
first frame before resolving the promise. Perhaps that would be better
expressed as cancelling the previous task?

> And once the animation is ready, will the animation run two tasks, one for
> the rescheduled pending task created by previous effect, and another
> created by the current effect?
> Some example code:
> ```js
> let effect1 = new KeyframeEffect(…);
> let effect2 = new KeyframeEffect(…);
> let anim = new Animation(effect1);
> anim.effect = effect2;
> anim.timeline = document.timeline;
> ```
> Should effect1 be updated in this case?

What do you mean by effect1 being updated?



Received on Friday, 10 April 2015 06:42:15 UTC