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

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

Issue 723713003: cc: Add SetChildrenNeedBeginFrames() & SendBeginFramesToChildren() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 1 month 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/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 DebugScopedSetMainThread main(this); 626 DebugScopedSetMainThread main(this);
627 next_frame_is_newly_committed_frame_ = false; 627 next_frame_is_newly_committed_frame_ = false;
628 layer_tree_host_->DidCommitAndDrawFrame(); 628 layer_tree_host_->DidCommitAndDrawFrame();
629 } 629 }
630 } 630 }
631 631
632 bool SingleThreadProxy::MainFrameWillHappenForTesting() { 632 bool SingleThreadProxy::MainFrameWillHappenForTesting() {
633 return false; 633 return false;
634 } 634 }
635 635
636 void SingleThreadProxy::SetChildrenNeedBeginFrames(
637 bool children_need_begin_frames) {
638 scheduler_on_impl_thread_->SetChildrenNeedBeginFrames(
639 children_need_begin_frames);
640 }
641
636 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { 642 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) {
637 layer_tree_host_impl_->WillBeginImplFrame(args); 643 layer_tree_host_impl_->WillBeginImplFrame(args);
638 } 644 }
639 645
640 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() { 646 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() {
641 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame"); 647 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame");
642 // Although this proxy is single-threaded, it's problematic to synchronously 648 // Although this proxy is single-threaded, it's problematic to synchronously
643 // have BeginMainFrame happen after ScheduledActionSendBeginMainFrame. This 649 // have BeginMainFrame happen after ScheduledActionSendBeginMainFrame. This
644 // could cause a commit to occur in between a series of SetNeedsCommit calls 650 // could cause a commit to occur in between a series of SetNeedsCommit calls
645 // (i.e. property modifications) causing some to fall on one frame and some to 651 // (i.e. property modifications) causing some to fall on one frame and some to
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 } 790 }
785 791
786 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { 792 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() {
787 return timing_history_.CommitToActivateDurationEstimate(); 793 return timing_history_.CommitToActivateDurationEstimate();
788 } 794 }
789 795
790 void SingleThreadProxy::DidBeginImplFrameDeadline() { 796 void SingleThreadProxy::DidBeginImplFrameDeadline() {
791 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); 797 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame();
792 } 798 }
793 799
800 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
801 layer_tree_host_->SendBeginFramesToChildren(args);
802 }
803
794 } // namespace cc 804 } // 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