cc: Make SingleThreadProxy CommitComplete ordering match ThreadProxy
commit3c3973b4e9562f7bcd67783383cc0a54f3da78b9
authordanakj <danakj@chromium.org>
Tue, 25 Aug 2015 21:50:18 +0000 (25 14:50 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 25 Aug 2015 21:50:52 +0000 (25 21:50 +0000)
tree8c8b240cb4f28e75ce121af89095f257f4c030f8
parent116ac9d048a4f11364e332836a2c2bdebd7bbaca
cc: Make SingleThreadProxy CommitComplete ordering match ThreadProxy

In ThreadProxy the order of operations is (when blocking main thead on
activation):
- CommitComplete on impl thread
- Activate
- CommitComplete on main thread

In SingleThreadProxy the order is:
- Activate
- CommitComplete on impl thread
- CommitComplete on main thread

This means that ordering is weird, both in tests and in production. I'd
like to move Animate() to CommitComplete but it happens at different
times so things get weird.

This changes the ordering to match. One thing this turned up is that we
need to activate animations during the commit since they are on the
active tree not the pending tree. And if we don't activate them, they
get ignored during UpdateDrawProperties as they appear to be on a
different tree.

This further turned up that currently when we activate an animation we
don't UpdateDrawProperties on the active tree afterward, leaving draw
properties incorrect for anything the animation would change for a
single frame.

R=ajuma, enne
BUG=522658
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1308393004

Cr-Commit-Position: refs/heads/master@{#345446}
cc/layers/texture_layer_unittest.cc
cc/test/layer_tree_pixel_test.cc
cc/test/layer_tree_pixel_test.h
cc/test/layer_tree_test.cc
cc/test/layer_tree_test.h
cc/trees/layer_tree_host_impl.cc
cc/trees/layer_tree_host_unittest_animation.cc
cc/trees/layer_tree_host_unittest_delegated.cc
cc/trees/single_thread_proxy.cc