Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 13844021: Move compositor thread input handling logic into content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 719bc0e4d50e9512ca85ec5bc9a26b382bfe9df4..fa6664a6623ecaaac1e6ceefb598bbc500da7b55 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -159,6 +159,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(
RenderingStatsInstrumentation* rendering_stats_instrumentation)
: client_(client),
proxy_(proxy),
+ input_handler_client_(NULL),
did_lock_scrolling_layer_(false),
should_bubble_scrolls_(false),
wheel_scrolling_(false),
@@ -210,6 +211,11 @@ LayerTreeHostImpl::~LayerTreeHostImpl() {
TRACE_EVENT_OBJECT_DELETED_WITH_ID(
TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", this);
+ if (input_handler_client_) {
+ input_handler_client_->WillShutdown();
+ input_handler_client_ = NULL;
+ }
+
if (active_tree_->root_layer()) {
ClearRenderSurfaces();
// The layer trees must be destroyed before the layer tree host. We've
@@ -277,6 +283,8 @@ bool LayerTreeHostImpl::CanDraw() {
void LayerTreeHostImpl::Animate(base::TimeTicks monotonic_time,
base::Time wall_clock_time) {
+ if (input_handler_client_)
+ input_handler_client_->Animate(monotonic_time);
AnimatePageScale(monotonic_time);
AnimateLayers(monotonic_time, wall_clock_time);
AnimateScrollbars(monotonic_time);
@@ -723,6 +731,11 @@ bool LayerTreeHostImpl::CalculateRenderPasses(FrameData* frame) {
return draw_frame;
}
+void LayerTreeHostImpl::MainThreadHasStoppedFlinging() {
+ if (input_handler_client_)
+ input_handler_client_->MainThreadHasStoppedFlinging();
+}
+
void LayerTreeHostImpl::UpdateBackgroundAnimateTicking(
bool should_background_tick) {
bool enabled = should_background_tick &&
@@ -1489,6 +1502,11 @@ bool LayerTreeHostImpl::EnsureRenderSurfaceLayerList() {
return !active_tree_->RenderSurfaceLayerList().empty();
}
+void LayerTreeHostImpl::BindToClient(InputHandlerClient* client) {
+ DCHECK(input_handler_client_ == NULL);
+ input_handler_client_ = client;
+}
+
InputHandler::ScrollStatus LayerTreeHostImpl::ScrollBegin(
gfx::Point viewport_point, InputHandler::ScrollInputType type) {
TRACE_EVENT0("cc", "LayerTreeHostImpl::ScrollBegin");
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698