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

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: 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 ef8cce707f4fb904177cd22f64a4516866075b00..2e82905fb6603feba9ffdf7d1439ec20e6610e6c 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -518,8 +518,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() {
@@ -528,13 +527,10 @@ void ThreadProxy::Start() {
// 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();
@@ -886,9 +882,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);
@@ -1080,9 +1073,7 @@ void ThreadProxy::TryToRecreateOutputSurface() {
output_surface_recreation_callback_.Cancel();
}
-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);
@@ -1113,12 +1104,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();
}
@@ -1163,7 +1148,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