Move VISUAL_STATE promise to activation
commit93d4648413ae2c80388e667dc37257308fa9e889
authortobiasjs <tobiasjs@chromium.org>
Fri, 15 May 2015 17:52:44 +0000 (15 10:52 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 15 May 2015 17:53:37 +0000 (15 17:53 +0000)
treedb7343ba3e51b39009ed93cdbd9f00bfc8da3097
parent3c1f64f9c822002263d9f0aa4e5e02cebb26671f
Move VISUAL_STATE promise to activation

Motivation is for android webview where compositor swaps
is not controlled by chromium code, but activations are.

Add a DidActivate to SwapPromise. This is an additional
call before DidSwap. It is not meant to be the end of a
SwapPromise as either DidSwap or DidNotSwap can still be
called afterwards.

Then modify the message queue to mark VISUAL_STATE messages
as ready to deliver in DidActivate. On chrome, the messages
are still delivered in swap, so there is no additional IPCs.
In webview, they can be delivered in the activation
callback.

BUG=431166

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

Cr-Commit-Position: refs/heads/master@{#330128}
14 files changed:
cc/layers/surface_layer.cc
cc/output/latency_info_swap_promise.cc
cc/output/latency_info_swap_promise.h
cc/output/swap_promise.h
cc/trees/layer_tree_host.cc
cc/trees/layer_tree_host_unittest.cc
cc/trees/layer_tree_impl.cc
content/browser/android/in_process/synchronous_compositor_impl.cc
content/renderer/gpu/frame_swap_message_queue.cc
content/renderer/gpu/frame_swap_message_queue.h
content/renderer/gpu/frame_swap_message_queue_unittest.cc
content/renderer/gpu/queue_message_swap_promise.cc
content/renderer/gpu/queue_message_swap_promise.h
content/renderer/gpu/queue_message_swap_promise_unittest.cc