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

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: 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
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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 DebugScopedSetMainThread main(this); 633 DebugScopedSetMainThread main(this);
634 next_frame_is_newly_committed_frame_ = false; 634 next_frame_is_newly_committed_frame_ = false;
635 layer_tree_host_->DidCommitAndDrawFrame(); 635 layer_tree_host_->DidCommitAndDrawFrame();
636 } 636 }
637 } 637 }
638 638
639 bool SingleThreadProxy::MainFrameWillHappenForTesting() { 639 bool SingleThreadProxy::MainFrameWillHappenForTesting() {
640 return false; 640 return false;
641 } 641 }
642 642
643 void SingleThreadProxy::SetChildrenNeedBeginFrames(
644 bool children_need_begin_frames) {
645 scheduler_on_impl_thread_->SetChildrenNeedBeginFrames(
646 children_need_begin_frames);
647 }
648
643 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { 649 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) {
644 layer_tree_host_impl_->WillBeginImplFrame(args); 650 layer_tree_host_impl_->WillBeginImplFrame(args);
645 } 651 }
646 652
647 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() { 653 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() {
648 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame"); 654 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame");
649 // Although this proxy is single-threaded, it's problematic to synchronously 655 // Although this proxy is single-threaded, it's problematic to synchronously
650 // have BeginMainFrame happen after ScheduledActionSendBeginMainFrame. This 656 // have BeginMainFrame happen after ScheduledActionSendBeginMainFrame. This
651 // could cause a commit to occur in between a series of SetNeedsCommit calls 657 // could cause a commit to occur in between a series of SetNeedsCommit calls
652 // (i.e. property modifications) causing some to fall on one frame and some to 658 // (i.e. property modifications) causing some to fall on one frame and some to
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 } 802 }
797 803
798 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { 804 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() {
799 return timing_history_.CommitToActivateDurationEstimate(); 805 return timing_history_.CommitToActivateDurationEstimate();
800 } 806 }
801 807
802 void SingleThreadProxy::DidBeginImplFrameDeadline() { 808 void SingleThreadProxy::DidBeginImplFrameDeadline() {
803 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); 809 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame();
804 } 810 }
805 811
812 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
813 layer_tree_host_->SendBeginFramesToChildren(args);
814 }
815
806 } // namespace cc 816 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698