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

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

Issue 2778223005: Plumb activation time to main (Closed)
Patch Set: remove performance observer Created 3 years, 8 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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 task_runner_provider_->MainThreadTaskRunner()->PostTask( 616 task_runner_provider_->MainThreadTaskRunner()->PostTask(
617 FROM_HERE, base::Bind(&SingleThreadProxy::BeginMainFrame, 617 FROM_HERE, base::Bind(&SingleThreadProxy::BeginMainFrame,
618 weak_factory_.GetWeakPtr(), begin_frame_args)); 618 weak_factory_.GetWeakPtr(), begin_frame_args));
619 layer_tree_host_impl_->DidSendBeginMainFrame(); 619 layer_tree_host_impl_->DidSendBeginMainFrame();
620 } 620 }
621 621
622 void SingleThreadProxy::SendBeginMainFrameNotExpectedSoon() { 622 void SingleThreadProxy::SendBeginMainFrameNotExpectedSoon() {
623 layer_tree_host_->BeginMainFrameNotExpectedSoon(); 623 layer_tree_host_->BeginMainFrameNotExpectedSoon();
624 } 624 }
625 625
626 int SingleThreadProxy::SyncTreeSourceFrameNumber() {
627 if (layer_tree_host_impl_ && layer_tree_host_impl_->pending_tree())
628 return layer_tree_host_impl_->pending_tree()->source_frame_number();
629 else
630 return 0;
631 }
632
626 void SingleThreadProxy::BeginMainFrame(const BeginFrameArgs& begin_frame_args) { 633 void SingleThreadProxy::BeginMainFrame(const BeginFrameArgs& begin_frame_args) {
627 if (scheduler_on_impl_thread_) { 634 if (scheduler_on_impl_thread_) {
628 scheduler_on_impl_thread_->NotifyBeginMainFrameStarted( 635 scheduler_on_impl_thread_->NotifyBeginMainFrameStarted(
629 base::TimeTicks::Now()); 636 base::TimeTicks::Now());
630 } 637 }
631 638
632 commit_requested_ = false; 639 commit_requested_ = false;
633 animate_requested_ = false; 640 animate_requested_ = false;
634 641
635 if (defer_commits_) { 642 if (defer_commits_) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 void SingleThreadProxy::DidFinishImplFrame() { 779 void SingleThreadProxy::DidFinishImplFrame() {
773 layer_tree_host_impl_->DidFinishImplFrame(); 780 layer_tree_host_impl_->DidFinishImplFrame();
774 #if DCHECK_IS_ON() 781 #if DCHECK_IS_ON()
775 DCHECK(inside_impl_frame_) 782 DCHECK(inside_impl_frame_)
776 << "DidFinishImplFrame called while not inside an impl frame!"; 783 << "DidFinishImplFrame called while not inside an impl frame!";
777 inside_impl_frame_ = false; 784 inside_impl_frame_ = false;
778 #endif 785 #endif
779 } 786 }
780 787
781 } // namespace cc 788 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698