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

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

Issue 2339633003: Reland of cc: Remove frame queuing from the scheduler. (Closed)
Patch Set: prevent draw if commit is pending 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
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());
305 scheduler_on_impl_thread_ = nullptr; 302 scheduler_on_impl_thread_ = nullptr;
306 layer_tree_host_impl_ = nullptr; 303 layer_tree_host_impl_ = nullptr;
307 } 304 }
308 layer_tree_host_ = NULL; 305 layer_tree_host_ = nullptr;
309 } 306 }
310 307
311 void SingleThreadProxy::SetMutator(std::unique_ptr<LayerTreeMutator> mutator) { 308 void SingleThreadProxy::SetMutator(std::unique_ptr<LayerTreeMutator> mutator) {
312 DCHECK(task_runner_provider_->IsMainThread()); 309 DCHECK(task_runner_provider_->IsMainThread());
313 DebugScopedSetImplThread impl(task_runner_provider_); 310 DebugScopedSetImplThread impl(task_runner_provider_);
314 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator)); 311 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator));
315 } 312 }
316 313
317 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { 314 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
318 TRACE_EVENT1("cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", 315 TRACE_EVENT1("cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw",
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 void SingleThreadProxy::DidFinishImplFrame() { 751 void SingleThreadProxy::DidFinishImplFrame() {
755 layer_tree_host_impl_->DidFinishImplFrame(); 752 layer_tree_host_impl_->DidFinishImplFrame();
756 #if DCHECK_IS_ON() 753 #if DCHECK_IS_ON()
757 DCHECK(inside_impl_frame_) 754 DCHECK(inside_impl_frame_)
758 << "DidFinishImplFrame called while not inside an impl frame!"; 755 << "DidFinishImplFrame called while not inside an impl frame!";
759 inside_impl_frame_ = false; 756 inside_impl_frame_ = false;
760 #endif 757 #endif
761 } 758 }
762 759
763 } // namespace cc 760 } // namespace cc
OLDNEW
« cc/scheduler/scheduler_state_machine.cc ('K') | « cc/trees/proxy_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698