That's a good point. The additional functionality that Google's proposal enables over the already-quite-powerful CSS Animations seems pretty small. The document brings up scrolling, but as I argued before, scrolling needs events, which this proposal does not address. So this really adds very little in practical terms over CSS animations except more CPU consumption and GC pauses.
I sympathize with the "extensible Web" part of this, but it seems to me that CSS animations are *already* quite low-level and extensible. What this proposal allows is procedural computation for the animations, which might be useful for things like complex particle simulations, but this won't be enough for the really important use cases from a UI perspective. Ultimately, as I said before, I think there is no sidestepping the need for a truly multithreaded browser engine to eliminate jank. Patrick Andreas Gal <[email protected]> wrote: > >How does this relate to the async animations we are already performing >on the compositor thread today? Isn't that sufficient for most >animations people want? (transform, opacity). > >Andreas > >On Oct 13, 2013, at 1:43 PM, Patrick Walton <[email protected]> >wrote: > >> This did make me realize something, however: If there are a subset of >CSS properties that can be changed from a worker thread, then those >layout properties can be changed from the main thread as well, without >a trip through layout. In other words: When changing something like >transform, if the node in question is layerized, we could talk directly >to the compositor from the script task. One could imagine at least some >subset of events also working this way, for example scrolling: the >compositor could send a scroll event directly to the script task if it >knows about a scrollable frame and the DOM node it maps to. If layout >is asynchronous and the script task is not blocked on it, then it can >respond directly to those events on the main thread, as native apps do. >> >> This strikes me as a technically better solution, because it provides >some mechanism for receiving events, as well as all the other >main-thread-only APIs (such as reading from the DOM!) in the thread >that's responsible for the animation. It's also hugely more usable to >Web authors, because it doesn't require use of Web workers and the >message passing that comes with it to get good performance. The >downsides are that it requires Web authors to not use the blocking >layout APIs to avoid shooting themselves in the foot, and that it >requires Servo's off-main-thread-layout design, which Chromium seems to >have unfortunately decided against. >> >> Patrick >> _______________________________________________ >> dev-servo mailing list >> [email protected] >> https://lists.mozilla.org/listinfo/dev-servo -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. _______________________________________________ dev-servo mailing list [email protected] https://lists.mozilla.org/listinfo/dev-servo

