A few things to remember when enabling image animations in the compositor for single threaded mode:
1) Drawing should happen only when the active tree is ready to draw. We reset this on each commit (https://cs.chromium.org/chromium/src/cc/scheduler/scheduler_state_machine.cc?q=scheduler_state_machine.cc&dr&l=706), but looks like impl-side invalidation is not doing this. Would be nice to consolidate all the flag updates in one WillCreatePendingTree function for both commits and invalidations.
2) For all components that cache tree specific state, we do the push from pending to active in ActivateSyncTree right after the commit/invalidation in single-threaded mode. This is fine in all other cases but for checker-imaging/image animations, UpdateSyncTreeAfterCommitOrImplSideInvalidation will schedule raster work before this push is done. And since the raster tasks depend on the state in these components, they end up with incorrect values. We should just this pushing of state in UpdateSyncTreeAfterCommitOrImplSideInvalidation before PrepareTiles.
Comment 1 by khushals...@chromium.org
, Oct 31 2017