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

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

Issue 2778223005: Plumb activation time to main (Closed)
Patch Set: add a vector instead of single activate frame time 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 task_runner_provider_->MainThreadTaskRunner()->PostTask( 617 task_runner_provider_->MainThreadTaskRunner()->PostTask(
618 FROM_HERE, base::Bind(&SingleThreadProxy::BeginMainFrame, 618 FROM_HERE, base::Bind(&SingleThreadProxy::BeginMainFrame,
619 weak_factory_.GetWeakPtr(), begin_frame_args)); 619 weak_factory_.GetWeakPtr(), begin_frame_args));
620 layer_tree_host_impl_->DidSendBeginMainFrame(); 620 layer_tree_host_impl_->DidSendBeginMainFrame();
621 } 621 }
622 622
623 void SingleThreadProxy::SendBeginMainFrameNotExpectedSoon() { 623 void SingleThreadProxy::SendBeginMainFrameNotExpectedSoon() {
624 layer_tree_host_->BeginMainFrameNotExpectedSoon(); 624 layer_tree_host_->BeginMainFrameNotExpectedSoon();
625 } 625 }
626 626
627 int SingleThreadProxy::SyncTreeSourceFrameNumber() {
vmpstr 2017/04/05 19:11:33 Do we have pending trees in single thread proxy? (
brianderson 2017/04/06 23:43:15 SingleThreadProxy is only used in the Browser, whe
panicker 2017/04/08 00:29:07 Updated to passing argument to NotifyReadyToActiva
panicker 2017/04/10 22:20:05 Discussed offline and updated to passing 0 here.
628 if (layer_tree_host_impl_ && layer_tree_host_impl_->pending_tree())
629 return layer_tree_host_impl_->pending_tree()->source_frame_number();
630 else
631 return 0;
632 }
633
627 void SingleThreadProxy::BeginMainFrame(const BeginFrameArgs& begin_frame_args) { 634 void SingleThreadProxy::BeginMainFrame(const BeginFrameArgs& begin_frame_args) {
628 if (scheduler_on_impl_thread_) { 635 if (scheduler_on_impl_thread_) {
629 scheduler_on_impl_thread_->NotifyBeginMainFrameStarted( 636 scheduler_on_impl_thread_->NotifyBeginMainFrameStarted(
630 base::TimeTicks::Now()); 637 base::TimeTicks::Now());
631 } 638 }
632 639
633 commit_requested_ = false; 640 commit_requested_ = false;
634 animate_requested_ = false; 641 animate_requested_ = false;
635 642
636 if (defer_commits_) { 643 if (defer_commits_) {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 void SingleThreadProxy::DidFinishImplFrame() { 795 void SingleThreadProxy::DidFinishImplFrame() {
789 layer_tree_host_impl_->DidFinishImplFrame(); 796 layer_tree_host_impl_->DidFinishImplFrame();
790 #if DCHECK_IS_ON() 797 #if DCHECK_IS_ON()
791 DCHECK(inside_impl_frame_) 798 DCHECK(inside_impl_frame_)
792 << "DidFinishImplFrame called while not inside an impl frame!"; 799 << "DidFinishImplFrame called while not inside an impl frame!";
793 inside_impl_frame_ = false; 800 inside_impl_frame_ = false;
794 #endif 801 #endif
795 } 802 }
796 803
797 } // namespace cc 804 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698