- From: Brian Birtles <bbirtles@mozilla.com>
- Date: Fri, 10 Apr 2015 15:41:47 +0900
- To: Glen Huang <curvedmark@gmail.com>
- Cc: "public-fx@w3.org" <public-fx@w3.org>
- Message-ID: <CAF-W_FRDeQxHxCRm7O3HfS3DO-YHvraXvdvbwGp_0na2WOjT7A@mail.gmail.com>
Hi Glen, On Mon, Mar 16, 2015 at 5:23 PM, Glen Huang <curvedmark@gmail.com> 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.play(); > anim.effect = effect2; > anim.timeline = document.timeline; > ``` > > Should effect1 be updated in this case? > What do you mean by effect1 being updated? Thanks, Brian
Received on Friday, 10 April 2015 06:42:15 UTC