mozilla :: #layout

17 Apr 2017
05:22birtlesdbaron: this is the AnimationWorklet proposal the Google team want to discuss: https://wicg.github.io/animation-worklet/
05:22dbaronok, I'll try to have a look, thanks
05:38annevkbirtles: one big flaw seems to be that they do not consider it can run in parallel to the main thread
05:39annevkbirtles: eg element proxy operations appear to assume a single thread
05:41birtlesannevk: I'm still trying to understand the element proxy part -- I can see that the changes to the outputStyle map are allowed to be reflected async
05:41birtlesbut I don't really understand how the element proxy fits in yet
05:43annevkbirtles: eg saying stuff is disconnected when an element is removed
05:43annevkbirtles: that requires message passing
05:44annevkbirtles: holding a direct ref to the element also seems somewhat wrong or at the very least magical
05:46birtlesannevk: yep. Presumably it's ok if the animator keeps animating for a few frames until it gets the "element gone" message?
05:48birtlesannevk: As for the direct ref, I don't know but I guess at an implementation-level it there would be some sort of indirection via a lookup table
05:51birtlesbut now I read the section on Running Animators and it definitely does feel like single-threaded execution is in mind
05:52annevkbirtles: yeah, not sure how else you'd do it
05:52annevkbirtles: how far is Servo layout?
05:53birtlesannevk: not sure -- I haven't heard any concrete plans about that -- I think bholley was interested in tackling pieces of that after Stylo
05:54annevkSeems without that it will be hard to give design input on this API
05:54birtlesannevk: but even then, perhaps we could use a similar approach to stylo: do the work in parallel and just queue up the state changes that need to happen on the main thread
05:56birtlesannevk: dbaron and I will meet this the Google folk later today and then again tomorrow so I'll make sure to mention that concern
05:58birtlesI think my main concern is all the talk about animation frames (which are a main thread thing) -- I was hoping for a model where the animators are stateless so we can run them on the main thread and compositor thread simultaneously if need be
18 Apr 2017
No messages
   
Last message: 11 days and 10 hours ago