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

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: Add BeginMainFrameNotExpectedUntil to content::CompositorImpl for Android. Created 3 years, 7 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') | content/browser/renderer_host/compositor_impl_android.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/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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 task_runner_provider_->MainThreadTaskRunner()->PostTask( 625 task_runner_provider_->MainThreadTaskRunner()->PostTask(
626 FROM_HERE, base::BindOnce(&SingleThreadProxy::BeginMainFrame, 626 FROM_HERE, base::BindOnce(&SingleThreadProxy::BeginMainFrame,
627 weak_factory_.GetWeakPtr(), begin_frame_args)); 627 weak_factory_.GetWeakPtr(), begin_frame_args));
628 layer_tree_host_impl_->DidSendBeginMainFrame(); 628 layer_tree_host_impl_->DidSendBeginMainFrame();
629 } 629 }
630 630
631 void SingleThreadProxy::SendBeginMainFrameNotExpectedSoon() { 631 void SingleThreadProxy::SendBeginMainFrameNotExpectedSoon() {
632 layer_tree_host_->BeginMainFrameNotExpectedSoon(); 632 layer_tree_host_->BeginMainFrameNotExpectedSoon();
633 } 633 }
634 634
635 void SingleThreadProxy::ScheduledActionBeginMainFrameNotExpectedUntil(
636 base::TimeTicks time) {
637 layer_tree_host_->BeginMainFrameNotExpectedUntil(time);
638 }
639
635 void SingleThreadProxy::BeginMainFrame(const BeginFrameArgs& begin_frame_args) { 640 void SingleThreadProxy::BeginMainFrame(const BeginFrameArgs& begin_frame_args) {
636 if (scheduler_on_impl_thread_) { 641 if (scheduler_on_impl_thread_) {
637 scheduler_on_impl_thread_->NotifyBeginMainFrameStarted( 642 scheduler_on_impl_thread_->NotifyBeginMainFrameStarted(
638 base::TimeTicks::Now()); 643 base::TimeTicks::Now());
639 } 644 }
640 645
641 commit_requested_ = false; 646 commit_requested_ = false;
642 animate_requested_ = false; 647 animate_requested_ = false;
643 648
644 if (defer_commits_) { 649 if (defer_commits_) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 << "DidFinishImplFrame called while not inside an impl frame!"; 805 << "DidFinishImplFrame called while not inside an impl frame!";
801 inside_impl_frame_ = false; 806 inside_impl_frame_ = false;
802 #endif 807 #endif
803 } 808 }
804 809
805 void SingleThreadProxy::DidReceiveCompositorFrameAck() { 810 void SingleThreadProxy::DidReceiveCompositorFrameAck() {
806 layer_tree_host_->DidReceiveCompositorFrameAck(); 811 layer_tree_host_->DidReceiveCompositorFrameAck();
807 } 812 }
808 813
809 } // namespace cc 814 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698