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

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

Issue 2386183003: Revert of cc: Remove frame queuing from the scheduler. (patchset #14 id:400001 of https://coderevie… (Closed)
Patch Set: fix revert 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 void SingleThreadProxy::Stop() { 285 void SingleThreadProxy::Stop() {
286 TRACE_EVENT0("cc", "SingleThreadProxy::stop"); 286 TRACE_EVENT0("cc", "SingleThreadProxy::stop");
287 DCHECK(task_runner_provider_->IsMainThread()); 287 DCHECK(task_runner_provider_->IsMainThread());
288 { 288 {
289 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); 289 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_);
290 DebugScopedSetImplThread impl(task_runner_provider_); 290 DebugScopedSetImplThread impl(task_runner_provider_);
291 291
292 // Take away the CompositorFrameSink before destroying things so it doesn't 292 // Take away the CompositorFrameSink before destroying things so it doesn't
293 // try to call into its client mid-shutdown. 293 // try to call into its client mid-shutdown.
294 layer_tree_host_impl_->ReleaseCompositorFrameSink(); 294 layer_tree_host_impl_->ReleaseCompositorFrameSink();
295
296 BlockingTaskRunner::CapturePostTasks blocked(
297 task_runner_provider_->blocking_main_thread_task_runner());
295 scheduler_on_impl_thread_ = nullptr; 298 scheduler_on_impl_thread_ = nullptr;
296 layer_tree_host_impl_ = nullptr; 299 layer_tree_host_impl_ = nullptr;
297 } 300 }
298 layer_tree_host_ = nullptr; 301 layer_tree_host_ = NULL;
299 } 302 }
300 303
301 void SingleThreadProxy::SetMutator(std::unique_ptr<LayerTreeMutator> mutator) { 304 void SingleThreadProxy::SetMutator(std::unique_ptr<LayerTreeMutator> mutator) {
302 DCHECK(task_runner_provider_->IsMainThread()); 305 DCHECK(task_runner_provider_->IsMainThread());
303 DebugScopedSetImplThread impl(task_runner_provider_); 306 DebugScopedSetImplThread impl(task_runner_provider_);
304 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator)); 307 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator));
305 } 308 }
306 309
307 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { 310 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
308 TRACE_EVENT1("cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", 311 TRACE_EVENT1("cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw",
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 void SingleThreadProxy::DidFinishImplFrame() { 741 void SingleThreadProxy::DidFinishImplFrame() {
739 layer_tree_host_impl_->DidFinishImplFrame(); 742 layer_tree_host_impl_->DidFinishImplFrame();
740 #if DCHECK_IS_ON() 743 #if DCHECK_IS_ON()
741 DCHECK(inside_impl_frame_) 744 DCHECK(inside_impl_frame_)
742 << "DidFinishImplFrame called while not inside an impl frame!"; 745 << "DidFinishImplFrame called while not inside an impl frame!";
743 inside_impl_frame_ = false; 746 inside_impl_frame_ = false;
744 #endif 747 #endif
745 } 748 }
746 749
747 } // namespace cc 750 } // 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