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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 | 808 |
801 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 809 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
802 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 810 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
803 } | 811 } |
804 | 812 |
805 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 813 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
806 layer_tree_host_->SendBeginFramesToChildren(args); | 814 layer_tree_host_->SendBeginFramesToChildren(args); |
807 } | 815 } |
808 | 816 |
809 } // namespace cc | 817 } // namespace cc |
OLD | NEW |