Route selection bounds updates through the compositor
commit19aec37d615420b1001e3f0505b06307a4fcfe0d
authorjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 1 Jul 2014 19:08:49 +0000 (1 19:08 +0000)
committerjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 1 Jul 2014 19:08:49 +0000 (1 19:08 +0000)
tree0790994e5d7c71e6496ed3c9ea4963dc2f0a87d6
parentadc6eb89e31942c80eda20db6abb1391c5b0a159
Route selection bounds updates through the compositor

Currently, the selection bounds are queried at the start of each frame on the
main thread. If the bounds differ from the previous bounds, an updated
notification is sent to the browser. This approach is problematic for many
reasons, the chief of which being the inability of such updates to remain in
sync with content that is transformed on the compositor thread.

Instead, plumb the selection bounds region through the compositor, anchoring
each bound to the appropriate composited layer.  This allows the compositor to
generated transformed bounds synchronized with transformed content, passed to
the browser with the CompositorFrameMetdadata.

Note that this patch only implements the compositor portion of the plumbing.
Enabling the feature in Blink and consuming the handle positions in the browser
will be done in https://codereview.chromium.org/359033002.

BUG=135959

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280858 0039d316-1c4b-4281-b951-d872f2087c98
19 files changed:
cc/cc.gyp
cc/input/layer_selection_bound.cc [new file with mode: 0644]
cc/input/layer_selection_bound.h [new file with mode: 0644]
cc/input/selection_bound_type.h [new file with mode: 0644]
cc/output/compositor_frame_metadata.h
cc/output/viewport_selection_bound.cc [new file with mode: 0644]
cc/output/viewport_selection_bound.h [new file with mode: 0644]
cc/trees/layer_tree_host.cc
cc/trees/layer_tree_host.h
cc/trees/layer_tree_host_impl.cc
cc/trees/layer_tree_host_impl_unittest.cc
cc/trees/layer_tree_impl.cc
cc/trees/layer_tree_impl.h
cc/trees/layer_tree_impl_unittest.cc
content/common/cc_messages.h
content/renderer/gpu/render_widget_compositor.cc
content/renderer/gpu/render_widget_compositor.h
content/test/web_layer_tree_view_impl_for_testing.cc
content/test/web_layer_tree_view_impl_for_testing.h