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

Side by Side Diff: cc/trees/single_thread_proxy.cc

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include WebCompositorMutatorClient from WebLayerTreeView to allow unique_ptr usage. Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/threaded_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/profiler/scoped_tracker.h" 9 #include "base/profiler/scoped_tracker.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 DebugScopedSetImplThread impl(task_runner_provider_); 362 DebugScopedSetImplThread impl(task_runner_provider_);
363 363
364 BlockingTaskRunner::CapturePostTasks blocked( 364 BlockingTaskRunner::CapturePostTasks blocked(
365 task_runner_provider_->blocking_main_thread_task_runner()); 365 task_runner_provider_->blocking_main_thread_task_runner());
366 scheduler_on_impl_thread_ = nullptr; 366 scheduler_on_impl_thread_ = nullptr;
367 layer_tree_host_impl_ = nullptr; 367 layer_tree_host_impl_ = nullptr;
368 } 368 }
369 layer_tree_host_ = NULL; 369 layer_tree_host_ = NULL;
370 } 370 }
371 371
372 void SingleThreadProxy::SetMutator(std::unique_ptr<LayerTreeMutator> mutator) {
373 DCHECK(task_runner_provider_->IsMainThread());
374 DebugScopedSetImplThread impl(task_runner_provider_);
375 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator));
376 }
377
372 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { 378 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
373 TRACE_EVENT1( 379 TRACE_EVENT1(
374 "cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); 380 "cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw);
375 DCHECK(task_runner_provider_->IsImplThread()); 381 DCHECK(task_runner_provider_->IsImplThread());
376 if (scheduler_on_impl_thread_) 382 if (scheduler_on_impl_thread_)
377 scheduler_on_impl_thread_->SetCanDraw(can_draw); 383 scheduler_on_impl_thread_->SetCanDraw(can_draw);
378 } 384 }
379 385
380 void SingleThreadProxy::NotifyReadyToActivate() { 386 void SingleThreadProxy::NotifyReadyToActivate() {
381 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToActivate"); 387 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToActivate");
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 void SingleThreadProxy::DidFinishImplFrame() { 889 void SingleThreadProxy::DidFinishImplFrame() {
884 layer_tree_host_impl_->DidFinishImplFrame(); 890 layer_tree_host_impl_->DidFinishImplFrame();
885 #if DCHECK_IS_ON() 891 #if DCHECK_IS_ON()
886 DCHECK(inside_impl_frame_) 892 DCHECK(inside_impl_frame_)
887 << "DidFinishImplFrame called while not inside an impl frame!"; 893 << "DidFinishImplFrame called while not inside an impl frame!";
888 inside_impl_frame_ = false; 894 inside_impl_frame_ = false;
889 #endif 895 #endif
890 } 896 }
891 897
892 } // namespace cc 898 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/threaded_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698