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

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

Issue 1213653005: Revert of cc: Measure compositor timing with finer granularity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@modeTimingHistory3
Patch Set: Created 5 years, 5 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/thread_proxy.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/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/debug/benchmark_instrumentation.h" 10 #include "cc/debug/benchmark_instrumentation.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 // the flag to force the tree to not draw until textures are ready. 283 // the flag to force the tree to not draw until textures are ready.
284 NotifyReadyToActivate(); 284 NotifyReadyToActivate();
285 } 285 }
286 } 286 }
287 287
288 void SingleThreadProxy::CommitComplete() { 288 void SingleThreadProxy::CommitComplete() {
289 DCHECK(!layer_tree_host_impl_->pending_tree()) 289 DCHECK(!layer_tree_host_impl_->pending_tree())
290 << "Activation is expected to have synchronously occurred by now."; 290 << "Activation is expected to have synchronously occurred by now.";
291 DCHECK(commit_blocking_task_runner_); 291 DCHECK(commit_blocking_task_runner_);
292 292
293 if (scheduler_on_impl_thread_)
294 scheduler_on_impl_thread_->DidCommit();
295
296 // Notify commit complete on the impl side after activate to satisfy any 293 // Notify commit complete on the impl side after activate to satisfy any
297 // SetNextCommitWaitsForActivation calls. 294 // SetNextCommitWaitsForActivation calls.
298 layer_tree_host_impl_->CommitComplete(); 295 layer_tree_host_impl_->CommitComplete();
299 296
300 DebugScopedSetMainThread main(this); 297 DebugScopedSetMainThread main(this);
301 commit_blocking_task_runner_.reset(); 298 commit_blocking_task_runner_.reset();
302 layer_tree_host_->CommitComplete(); 299 layer_tree_host_->CommitComplete();
303 layer_tree_host_->DidBeginMainFrame(); 300 layer_tree_host_->DidBeginMainFrame();
304 301
305 next_frame_is_newly_committed_frame_ = true; 302 next_frame_is_newly_committed_frame_ = true;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 // after commit since single thread commits directly to the active tree. 448 // after commit since single thread commits directly to the active tree.
452 if (scheduler_on_impl_thread_) 449 if (scheduler_on_impl_thread_)
453 scheduler_on_impl_thread_->SetWaitForReadyToDraw(); 450 scheduler_on_impl_thread_->SetWaitForReadyToDraw();
454 451
455 // Synchronously call to CommitComplete. Resetting 452 // Synchronously call to CommitComplete. Resetting
456 // |commit_blocking_task_runner| would make sure all tasks posted during 453 // |commit_blocking_task_runner| would make sure all tasks posted during
457 // commit/activation before CommitComplete. 454 // commit/activation before CommitComplete.
458 CommitComplete(); 455 CommitComplete();
459 } 456 }
460 457
461 void SingleThreadProxy::WillPrepareTiles() {
462 DCHECK(Proxy::IsImplThread());
463 if (scheduler_on_impl_thread_)
464 scheduler_on_impl_thread_->WillPrepareTiles();
465 }
466
467 void SingleThreadProxy::DidPrepareTiles() { 458 void SingleThreadProxy::DidPrepareTiles() {
468 DCHECK(Proxy::IsImplThread()); 459 DCHECK(Proxy::IsImplThread());
469 if (scheduler_on_impl_thread_) 460 if (scheduler_on_impl_thread_)
470 scheduler_on_impl_thread_->DidPrepareTiles(); 461 scheduler_on_impl_thread_->DidPrepareTiles();
471 } 462 }
472 463
473 void SingleThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 464 void SingleThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
474 layer_tree_host_->DidCompletePageScaleAnimation(); 465 layer_tree_host_->DidCompletePageScaleAnimation();
475 } 466 }
476 467
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 << "DidFinishImplFrame called while not inside an impl frame!"; 900 << "DidFinishImplFrame called while not inside an impl frame!";
910 inside_impl_frame_ = false; 901 inside_impl_frame_ = false;
911 #endif 902 #endif
912 } 903 }
913 904
914 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 905 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
915 layer_tree_host_->SendBeginFramesToChildren(args); 906 layer_tree_host_->SendBeginFramesToChildren(args);
916 } 907 }
917 908
918 } // namespace cc 909 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698