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

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

Issue 2379343003: Revert of cc: Remove frame queuing from the scheduler. (Closed)
Patch Set: Created 4 years, 2 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/proxy_impl.cc ('k') | no next file » | 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 void SingleThreadProxy::Stop() { 292 void SingleThreadProxy::Stop() {
293 TRACE_EVENT0("cc", "SingleThreadProxy::stop"); 293 TRACE_EVENT0("cc", "SingleThreadProxy::stop");
294 DCHECK(task_runner_provider_->IsMainThread()); 294 DCHECK(task_runner_provider_->IsMainThread());
295 { 295 {
296 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); 296 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_);
297 DebugScopedSetImplThread impl(task_runner_provider_); 297 DebugScopedSetImplThread impl(task_runner_provider_);
298 298
299 // Take away the CompositorFrameSink before destroying things so it doesn't 299 // Take away the CompositorFrameSink before destroying things so it doesn't
300 // try to call into its client mid-shutdown. 300 // try to call into its client mid-shutdown.
301 layer_tree_host_impl_->ReleaseCompositorFrameSink(); 301 layer_tree_host_impl_->ReleaseCompositorFrameSink();
302
303 BlockingTaskRunner::CapturePostTasks blocked(
304 task_runner_provider_->blocking_main_thread_task_runner());
302 scheduler_on_impl_thread_ = nullptr; 305 scheduler_on_impl_thread_ = nullptr;
303 layer_tree_host_impl_ = nullptr; 306 layer_tree_host_impl_ = nullptr;
304 } 307 }
305 layer_tree_host_ = nullptr; 308 layer_tree_host_ = NULL;
306 } 309 }
307 310
308 void SingleThreadProxy::SetMutator(std::unique_ptr<LayerTreeMutator> mutator) { 311 void SingleThreadProxy::SetMutator(std::unique_ptr<LayerTreeMutator> mutator) {
309 DCHECK(task_runner_provider_->IsMainThread()); 312 DCHECK(task_runner_provider_->IsMainThread());
310 DebugScopedSetImplThread impl(task_runner_provider_); 313 DebugScopedSetImplThread impl(task_runner_provider_);
311 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator)); 314 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator));
312 } 315 }
313 316
314 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { 317 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
315 TRACE_EVENT1("cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", 318 TRACE_EVENT1("cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw",
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 void SingleThreadProxy::DidFinishImplFrame() { 754 void SingleThreadProxy::DidFinishImplFrame() {
752 layer_tree_host_impl_->DidFinishImplFrame(); 755 layer_tree_host_impl_->DidFinishImplFrame();
753 #if DCHECK_IS_ON() 756 #if DCHECK_IS_ON()
754 DCHECK(inside_impl_frame_) 757 DCHECK(inside_impl_frame_)
755 << "DidFinishImplFrame called while not inside an impl frame!"; 758 << "DidFinishImplFrame called while not inside an impl frame!";
756 inside_impl_frame_ = false; 759 inside_impl_frame_ = false;
757 #endif 760 #endif
758 } 761 }
759 762
760 } // namespace cc 763 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698