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/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(task_runner_provider_); | 108 DebugScopedSetImplThread impl(task_runner_provider_); |
109 | 109 |
110 layer_tree_host_impl_->SetVisible(visible); | 110 layer_tree_host_impl_->SetVisible(visible); |
111 | 111 |
112 if (scheduler_on_impl_thread_) | 112 if (scheduler_on_impl_thread_) |
113 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); | 113 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); |
114 } | 114 } |
115 | 115 |
| 116 void SingleThreadProxy::SetIsFullscreen(bool is_fullscreen) { |
| 117 TRACE_EVENT1("cc", "SingleThreadProxy::SetIsFullscreen", "is_fullscreen", |
| 118 is_fullscreen); |
| 119 DebugScopedSetImplThread impl(task_runner_provider_); |
| 120 |
| 121 layer_tree_host_impl_->SetIsFullscreen(is_fullscreen); |
| 122 } |
| 123 |
116 void SingleThreadProxy::RequestNewCompositorFrameSink() { | 124 void SingleThreadProxy::RequestNewCompositorFrameSink() { |
117 DCHECK(task_runner_provider_->IsMainThread()); | 125 DCHECK(task_runner_provider_->IsMainThread()); |
118 compositor_frame_sink_creation_callback_.Cancel(); | 126 compositor_frame_sink_creation_callback_.Cancel(); |
119 if (compositor_frame_sink_creation_requested_) | 127 if (compositor_frame_sink_creation_requested_) |
120 return; | 128 return; |
121 compositor_frame_sink_creation_requested_ = true; | 129 compositor_frame_sink_creation_requested_ = true; |
122 layer_tree_host_->RequestNewCompositorFrameSink(); | 130 layer_tree_host_->RequestNewCompositorFrameSink(); |
123 } | 131 } |
124 | 132 |
125 void SingleThreadProxy::ReleaseCompositorFrameSink() { | 133 void SingleThreadProxy::ReleaseCompositorFrameSink() { |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 void SingleThreadProxy::DidNotProduceFrame(const BeginFrameAck& ack) { | 818 void SingleThreadProxy::DidNotProduceFrame(const BeginFrameAck& ack) { |
811 DebugScopedSetImplThread impl(task_runner_provider_); | 819 DebugScopedSetImplThread impl(task_runner_provider_); |
812 layer_tree_host_impl_->DidNotProduceFrame(ack); | 820 layer_tree_host_impl_->DidNotProduceFrame(ack); |
813 } | 821 } |
814 | 822 |
815 void SingleThreadProxy::DidReceiveCompositorFrameAck() { | 823 void SingleThreadProxy::DidReceiveCompositorFrameAck() { |
816 layer_tree_host_->DidReceiveCompositorFrameAck(); | 824 layer_tree_host_->DidReceiveCompositorFrameAck(); |
817 } | 825 } |
818 | 826 |
819 } // namespace cc | 827 } // namespace cc |
OLD | NEW |