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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 void SingleThreadProxy::SetVisible(bool visible) { | 106 void SingleThreadProxy::SetVisible(bool visible) { |
107 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); | 107 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); |
108 DebugScopedSetImplThread impl(this); | 108 DebugScopedSetImplThread impl(this); |
109 layer_tree_host_impl_->SetVisible(visible); | 109 layer_tree_host_impl_->SetVisible(visible); |
110 if (scheduler_on_impl_thread_) | 110 if (scheduler_on_impl_thread_) |
111 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); | 111 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); |
112 // Changing visibility could change ShouldComposite(). | 112 // Changing visibility could change ShouldComposite(). |
113 } | 113 } |
114 | 114 |
| 115 void SingleThreadProxy::SetThrottleFrameProduction(bool throttle) { |
| 116 TRACE_EVENT1("cc", "SingleThreadProxy::SetThrottleFrameProduction", |
| 117 "throttle", throttle); |
| 118 DebugScopedSetImplThread impl(this); |
| 119 if (scheduler_on_impl_thread_) |
| 120 scheduler_on_impl_thread_->SetThrottleFrameProduction(throttle); |
| 121 } |
| 122 |
115 void SingleThreadProxy::RequestNewOutputSurface() { | 123 void SingleThreadProxy::RequestNewOutputSurface() { |
116 DCHECK(Proxy::IsMainThread()); | 124 DCHECK(Proxy::IsMainThread()); |
117 DCHECK(layer_tree_host_->output_surface_lost()); | 125 DCHECK(layer_tree_host_->output_surface_lost()); |
118 output_surface_creation_callback_.Cancel(); | 126 output_surface_creation_callback_.Cancel(); |
119 if (output_surface_creation_requested_) | 127 if (output_surface_creation_requested_) |
120 return; | 128 return; |
121 output_surface_creation_requested_ = true; | 129 output_surface_creation_requested_ = true; |
122 layer_tree_host_->RequestNewOutputSurface(); | 130 layer_tree_host_->RequestNewOutputSurface(); |
123 } | 131 } |
124 | 132 |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 | 802 |
795 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 803 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
796 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 804 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
797 } | 805 } |
798 | 806 |
799 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 807 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
800 layer_tree_host_->SendBeginFramesToChildren(args); | 808 layer_tree_host_->SendBeginFramesToChildren(args); |
801 } | 809 } |
802 | 810 |
803 } // namespace cc | 811 } // namespace cc |
OLD | NEW |