New issue
Advanced search Search tips
Starred by 3 users

Issue metadata

Status: Fixed
Closed: Apr 2018
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Sign in to add a comment

Issue 731727: AnimationWorklet - Use a dedicated backing thread

Reported by, Jun 9 2017 Project Member

Issue description

At the moment animation worklets are running on the compositor thread [1]. We should move to having a dedicated "Animation Thread" for animation worklet tasks. 

At the moment, this involves the following changes:
 - AnimationWorklet should create its own backing thread
 - Introduce a new CompositorAnimator implementation that posts tasks 
   to animation thread upon mutation.
 - Use this new CompositorAnimator to worklet rAF

Note that currently we don't use the MutatbleStateProvider with
animation worklet so the only state that needs to be passed
across thread is just the monotonic time of the frame.


Comment 1 by, Jun 9 2017

Blocking: 430155
Labels: Hotlist-ThreadedRendering

Comment 2 by, Jun 9 2017

 Issue 666032  has been merged into this issue.

Comment 3 by, Jun 26 2017

FWIW, I think AudioWorklet creates its own backing thread so first part of this task should be similar. See for example:

Comment 4 by, Sep 8 2017

Status: Started (was: Assigned)

Comment 5 by, Sep 8 2017

Blocking: 714873

Comment 6 by, Dec 2 2017

Blocking: 791280

Comment 7 by, Feb 2 2018

Labels: -OS-Android

Comment 8 by, Mar 19 2018

Project Member
The following revision refers to this bug:

commit d13bc9cfaa290602169197d0a2cf82fee1f016d7
Author: Peter Mayo <>
Date: Mon Mar 19 21:44:07 2018

[animation-worklet] Move work to a separate backing thread

This version introduces the backing thread.
It uses a completion event to do the animation synchronously; this
lines up with the division of tasks outlined in the task issues.
The mutation update is sent synchronously.
In moving some classes (CompositorMutator based) to a compositor managed
lifetime they change to refcounting to match the thread behavior.

Bug:  731727 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ia774e53b5bf34e0cef5d7f0dd9d02fc3b27f4b20
Commit-Queue: Peter Mayo <>
Reviewed-by: Robert Flack <>
Reviewed-by: Alexander Timin <>
Reviewed-by: Majid Valipour <>
Reviewed-by: Hiroki Nakagawa <>
Cr-Commit-Position: refs/heads/master@{#544171}

Comment 9 by, Apr 12 2018

Owner: ----
Status: Fixed (was: Started)

Comment 10 by, Apr 12 2018


Sign in to add a comment