OLD | NEW |
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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 } | 548 } |
549 | 549 |
550 bool SingleThreadProxy::MainFrameWillHappenForTesting() { | 550 bool SingleThreadProxy::MainFrameWillHappenForTesting() { |
551 return false; | 551 return false; |
552 } | 552 } |
553 | 553 |
554 BeginFrameSource* SingleThreadProxy::ExternalBeginFrameSource() { | 554 BeginFrameSource* SingleThreadProxy::ExternalBeginFrameSource() { |
555 return layer_tree_host_impl_.get(); | 555 return layer_tree_host_impl_.get(); |
556 } | 556 } |
557 | 557 |
| 558 base::PowerMonitor* SingleThreadProxy::PowerMonitor() { |
| 559 return base::PowerMonitor::Get(); |
| 560 } |
| 561 |
558 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { | 562 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { |
559 layer_tree_host_impl_->WillBeginImplFrame(args); | 563 layer_tree_host_impl_->WillBeginImplFrame(args); |
560 } | 564 } |
561 | 565 |
562 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() { | 566 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() { |
563 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame"); | 567 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame"); |
564 // Although this proxy is single-threaded, it's problematic to synchronously | 568 // Although this proxy is single-threaded, it's problematic to synchronously |
565 // have BeginMainFrame happen after ScheduledActionSendBeginMainFrame. This | 569 // have BeginMainFrame happen after ScheduledActionSendBeginMainFrame. This |
566 // could cause a commit to occur in between a series of SetNeedsCommit calls | 570 // could cause a commit to occur in between a series of SetNeedsCommit calls |
567 // (i.e. property modifications) causing some to fall on one frame and some to | 571 // (i.e. property modifications) causing some to fall on one frame and some to |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 | 687 |
684 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { | 688 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { |
685 return timing_history_.CommitToActivateDurationEstimate(); | 689 return timing_history_.CommitToActivateDurationEstimate(); |
686 } | 690 } |
687 | 691 |
688 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 692 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
689 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 693 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
690 } | 694 } |
691 | 695 |
692 } // namespace cc | 696 } // namespace cc |
OLD | NEW |