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

Unified Diff: cc/trees/thread_proxy.cc

Issue 13844021: Move compositor thread input handling logic into content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win component build Created 7 years, 8 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
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 166e6e2f971b2856e1f443ef8094b785c053e60f..2badb07b6069154c4f78a326022f1841b023c935 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -513,8 +513,7 @@ void ThreadProxy::MainThreadHasStoppedFlinging() {
void ThreadProxy::MainThreadHasStoppedFlingingOnImplThread() {
DCHECK(IsImplThread());
- if (input_handler_client_on_impl_thread_)
- input_handler_client_on_impl_thread_->MainThreadHasStoppedFlinging();
+ layer_tree_host_impl_->MainThreadHasStoppedFlinging();
}
void ThreadProxy::Start(scoped_ptr<OutputSurface> first_output_surface) {
@@ -524,13 +523,10 @@ void ThreadProxy::Start(scoped_ptr<OutputSurface> first_output_surface) {
// Create LayerTreeHostImpl.
DebugScopedSetMainThreadBlocked main_thread_blocked(this);
CompletionEvent completion;
- scoped_ptr<InputHandlerClient> input_handler_client =
- layer_tree_host_->CreateInputHandlerClient();
Proxy::ImplThread()->PostTask(
base::Bind(&ThreadProxy::InitializeImplOnImplThread,
base::Unretained(this),
- &completion,
- input_handler_client.release()));
+ &completion));
completion.Wait();
main_thread_weak_ptr_ = weak_factory_.GetWeakPtr();
@@ -892,9 +888,6 @@ ThreadProxy::ScheduledActionDrawAndSwapInternal(bool forced_draw) {
layer_tree_host_impl_->CurrentFrameTimeTicks();
base::Time wall_clock_time = layer_tree_host_impl_->CurrentFrameTime();
- if (input_handler_client_on_impl_thread_)
- input_handler_client_on_impl_thread_->Animate(monotonic_time);
-
layer_tree_host_impl_->ActivatePendingTreeIfNeeded();
layer_tree_host_impl_->Animate(monotonic_time, wall_clock_time);
layer_tree_host_impl_->UpdateBackgroundAnimateTicking(false);
@@ -1100,9 +1093,7 @@ void ThreadProxy::HasInitializedOutputSurfaceOnImplThread(
completion->Signal();
}
-void ThreadProxy::InitializeImplOnImplThread(
- CompletionEvent* completion,
- InputHandlerClient* input_handler_client) {
+void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) {
TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread");
DCHECK(IsImplThread());
layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this);
@@ -1133,12 +1124,6 @@ void ThreadProxy::InitializeImplOnImplThread(
scheduler_settings);
scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible());
- input_handler_client_on_impl_thread_.reset(input_handler_client);
- if (input_handler_client_on_impl_thread_) {
- input_handler_client_on_impl_thread_->BindToHandler(
- layer_tree_host_impl_.get());
- }
-
impl_thread_weak_ptr_ = weak_factory_on_impl_thread_.GetWeakPtr();
completion->Signal();
}
@@ -1204,7 +1189,6 @@ void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) {
layer_tree_host_->DeleteContentsTexturesOnImplThread(
layer_tree_host_impl_->resource_provider());
layer_tree_host_impl_->EnableVSyncNotification(false);
- input_handler_client_on_impl_thread_.reset();
layer_tree_host_impl_.reset();
scheduler_on_impl_thread_.reset();
weak_factory_on_impl_thread_.InvalidateWeakPtrs();

Powered by Google App Engine
This is Rietveld 408576698