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

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

Issue 2753843003: Create a new action triggered when a BeginMainFrame is not expected before vsync (Closed)
Patch Set: respond to Brian's comments 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 void SingleThreadProxy::ScheduledActionBeginMainFrameNotExpectedUntil(
628 base::TimeTicks time) {
629 layer_tree_host_->BeginMainFrameNotExpectedUntil(time);
630 }
631
627 void SingleThreadProxy::BeginMainFrame(const BeginFrameArgs& begin_frame_args) { 632 void SingleThreadProxy::BeginMainFrame(const BeginFrameArgs& begin_frame_args) {
628 if (scheduler_on_impl_thread_) { 633 if (scheduler_on_impl_thread_) {
629 scheduler_on_impl_thread_->NotifyBeginMainFrameStarted( 634 scheduler_on_impl_thread_->NotifyBeginMainFrameStarted(
630 base::TimeTicks::Now()); 635 base::TimeTicks::Now());
631 } 636 }
632 637
633 commit_requested_ = false; 638 commit_requested_ = false;
634 animate_requested_ = false; 639 animate_requested_ = false;
635 640
636 if (defer_commits_) { 641 if (defer_commits_) {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 void SingleThreadProxy::DidFinishImplFrame() { 793 void SingleThreadProxy::DidFinishImplFrame() {
789 layer_tree_host_impl_->DidFinishImplFrame(); 794 layer_tree_host_impl_->DidFinishImplFrame();
790 #if DCHECK_IS_ON() 795 #if DCHECK_IS_ON()
791 DCHECK(inside_impl_frame_) 796 DCHECK(inside_impl_frame_)
792 << "DidFinishImplFrame called while not inside an impl frame!"; 797 << "DidFinishImplFrame called while not inside an impl frame!";
793 inside_impl_frame_ = false; 798 inside_impl_frame_ = false;
794 #endif 799 #endif
795 } 800 }
796 801
797 } // namespace cc 802 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698