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

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

Issue 1192663005: cc: Measure compositor timing with finer granularity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@modeTimingHistory3
Patch Set: don't reset timing history 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
293 // Notify commit complete on the impl side after activate to satisfy any 296 // Notify commit complete on the impl side after activate to satisfy any
294 // SetNextCommitWaitsForActivation calls. 297 // SetNextCommitWaitsForActivation calls.
295 layer_tree_host_impl_->CommitComplete(); 298 layer_tree_host_impl_->CommitComplete();
296 299
297 DebugScopedSetMainThread main(this); 300 DebugScopedSetMainThread main(this);
298 commit_blocking_task_runner_.reset(); 301 commit_blocking_task_runner_.reset();
299 layer_tree_host_->CommitComplete(); 302 layer_tree_host_->CommitComplete();
300 layer_tree_host_->DidBeginMainFrame(); 303 layer_tree_host_->DidBeginMainFrame();
301 304
302 next_frame_is_newly_committed_frame_ = true; 305 next_frame_is_newly_committed_frame_ = true;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 // after commit since single thread commits directly to the active tree. 451 // after commit since single thread commits directly to the active tree.
449 if (scheduler_on_impl_thread_) 452 if (scheduler_on_impl_thread_)
450 scheduler_on_impl_thread_->SetWaitForReadyToDraw(); 453 scheduler_on_impl_thread_->SetWaitForReadyToDraw();
451 454
452 // Synchronously call to CommitComplete. Resetting 455 // Synchronously call to CommitComplete. Resetting
453 // |commit_blocking_task_runner| would make sure all tasks posted during 456 // |commit_blocking_task_runner| would make sure all tasks posted during
454 // commit/activation before CommitComplete. 457 // commit/activation before CommitComplete.
455 CommitComplete(); 458 CommitComplete();
456 } 459 }
457 460
461 void SingleThreadProxy::WillPrepareTiles() {
462 DCHECK(Proxy::IsImplThread());
463 if (scheduler_on_impl_thread_)
464 scheduler_on_impl_thread_->WillPrepareTiles();
465 }
466
458 void SingleThreadProxy::DidPrepareTiles() { 467 void SingleThreadProxy::DidPrepareTiles() {
459 DCHECK(Proxy::IsImplThread()); 468 DCHECK(Proxy::IsImplThread());
460 if (scheduler_on_impl_thread_) 469 if (scheduler_on_impl_thread_)
461 scheduler_on_impl_thread_->DidPrepareTiles(); 470 scheduler_on_impl_thread_->DidPrepareTiles();
462 } 471 }
463 472
464 void SingleThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 473 void SingleThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
465 layer_tree_host_->DidCompletePageScaleAnimation(); 474 layer_tree_host_->DidCompletePageScaleAnimation();
466 } 475 }
467 476
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 << "DidFinishImplFrame called while not inside an impl frame!"; 922 << "DidFinishImplFrame called while not inside an impl frame!";
914 inside_impl_frame_ = false; 923 inside_impl_frame_ = false;
915 #endif 924 #endif
916 } 925 }
917 926
918 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 927 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
919 layer_tree_host_->SendBeginFramesToChildren(args); 928 layer_tree_host_->SendBeginFramesToChildren(args);
920 } 929 }
921 930
922 } // namespace cc 931 } // 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