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/profiler/scoped_tracker.h" | 8 #include "base/profiler/scoped_tracker.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "cc/animation/animation_events.h" | 10 #include "cc/animation/animation_events.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 void SingleThreadProxy::SetVisible(bool visible) { | 111 void SingleThreadProxy::SetVisible(bool visible) { |
112 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); | 112 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); |
113 DebugScopedSetImplThread impl(task_runner_provider_); | 113 DebugScopedSetImplThread impl(task_runner_provider_); |
114 | 114 |
115 layer_tree_host_impl_->SetVisible(visible); | 115 layer_tree_host_impl_->SetVisible(visible); |
116 | 116 |
117 if (scheduler_on_impl_thread_) | 117 if (scheduler_on_impl_thread_) |
118 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); | 118 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); |
119 } | 119 } |
120 | 120 |
121 void SingleThreadProxy::SetThrottleFrameProduction(bool throttle) { | |
122 TRACE_EVENT1("cc", "SingleThreadProxy::SetThrottleFrameProduction", | |
123 "throttle", throttle); | |
124 DebugScopedSetImplThread impl(task_runner_provider_); | |
125 if (scheduler_on_impl_thread_) | |
126 scheduler_on_impl_thread_->SetThrottleFrameProduction(throttle); | |
127 } | |
128 | |
129 void SingleThreadProxy::RequestNewOutputSurface() { | 121 void SingleThreadProxy::RequestNewOutputSurface() { |
130 DCHECK(task_runner_provider_->IsMainThread()); | 122 DCHECK(task_runner_provider_->IsMainThread()); |
131 DCHECK(layer_tree_host_->output_surface_lost()); | 123 DCHECK(layer_tree_host_->output_surface_lost()); |
132 output_surface_creation_callback_.Cancel(); | 124 output_surface_creation_callback_.Cancel(); |
133 if (output_surface_creation_requested_) | 125 if (output_surface_creation_requested_) |
134 return; | 126 return; |
135 output_surface_creation_requested_ = true; | 127 output_surface_creation_requested_ = true; |
136 layer_tree_host_->RequestNewOutputSurface(); | 128 layer_tree_host_->RequestNewOutputSurface(); |
137 } | 129 } |
138 | 130 |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 << "DidFinishImplFrame called while not inside an impl frame!"; | 867 << "DidFinishImplFrame called while not inside an impl frame!"; |
876 inside_impl_frame_ = false; | 868 inside_impl_frame_ = false; |
877 #endif | 869 #endif |
878 } | 870 } |
879 | 871 |
880 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 872 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
881 layer_tree_host_->SendBeginFramesToChildren(args); | 873 layer_tree_host_->SendBeginFramesToChildren(args); |
882 } | 874 } |
883 | 875 |
884 } // namespace cc | 876 } // namespace cc |
OLD | NEW |