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

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

Issue 423773002: Unified BeginFrame scheduling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Working on aura with --enable-begin-frame-scheduling Created 6 years, 4 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 | Annotate | Revision Log
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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 void SingleThreadProxy::DidCommitAndDrawFrame() { 545 void SingleThreadProxy::DidCommitAndDrawFrame() {
546 if (next_frame_is_newly_committed_frame_) { 546 if (next_frame_is_newly_committed_frame_) {
547 DebugScopedSetMainThread main(this); 547 DebugScopedSetMainThread main(this);
548 next_frame_is_newly_committed_frame_ = false; 548 next_frame_is_newly_committed_frame_ = false;
549 layer_tree_host_->DidCommitAndDrawFrame(); 549 layer_tree_host_->DidCommitAndDrawFrame();
550 } 550 }
551 } 551 }
552 552
553 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 553 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
554 554
555 void SingleThreadProxy::BeginFrameRequested() {
556 if (scheduler_on_impl_thread_)
brianderson 2014/08/21 00:14:00 In what case would a Renderer request a BeginFrame
simonhong 2014/08/26 08:24:48 This function also removed. :)
557 scheduler_on_impl_thread_->BeginFrameRequested();
558 }
559
555 void SingleThreadProxy::SetNeedsBeginFrame(bool enable) { 560 void SingleThreadProxy::SetNeedsBeginFrame(bool enable) {
556 layer_tree_host_impl_->SetNeedsBeginFrame(enable); 561 layer_tree_host_impl_->SetNeedsBeginFrame(enable);
557 } 562 }
558 563
559 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { 564 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) {
560 layer_tree_host_impl_->WillBeginImplFrame(args); 565 layer_tree_host_impl_->WillBeginImplFrame(args);
561 } 566 }
562 567
563 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() { 568 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() {
564 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame"); 569 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame");
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 } 663 }
659 664
660 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { 665 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() {
661 return timing_history_.CommitToActivateDurationEstimate(); 666 return timing_history_.CommitToActivateDurationEstimate();
662 } 667 }
663 668
664 void SingleThreadProxy::DidBeginImplFrameDeadline() { 669 void SingleThreadProxy::DidBeginImplFrameDeadline() {
665 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); 670 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame();
666 } 671 }
667 672
673 void SingleThreadProxy::SendBeginFrame(const BeginFrameArgs& args) {
674 layer_tree_host_->SendBeginFrame(args);
675 }
676
668 } // namespace cc 677 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698