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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 SetNeedsCommit(); | 169 SetNeedsCommit(); |
170 } | 170 } |
171 } | 171 } |
172 | 172 |
173 const RendererCapabilities& SingleThreadProxy::GetRendererCapabilities() const { | 173 const RendererCapabilities& SingleThreadProxy::GetRendererCapabilities() const { |
174 DCHECK(Proxy::IsMainThread()); | 174 DCHECK(Proxy::IsMainThread()); |
175 DCHECK(!layer_tree_host_->output_surface_lost()); | 175 DCHECK(!layer_tree_host_->output_surface_lost()); |
176 return renderer_capabilities_for_main_thread_; | 176 return renderer_capabilities_for_main_thread_; |
177 } | 177 } |
178 | 178 |
179 void SingleThreadProxy::SetNeedsAnimate() { | |
180 // Thread-only feature. | |
181 NOTREACHED(); | |
182 } | |
183 | |
184 void SingleThreadProxy::SetNeedsUpdateLayers() { | 179 void SingleThreadProxy::SetNeedsUpdateLayers() { |
185 DCHECK(Proxy::IsMainThread()); | 180 DCHECK(Proxy::IsMainThread()); |
186 client_->ScheduleComposite(); | 181 client_->ScheduleComposite(); |
187 } | 182 } |
188 | 183 |
189 void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) { | 184 void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) { |
190 DCHECK(Proxy::IsMainThread()); | 185 DCHECK(Proxy::IsMainThread()); |
191 // Commit immediately. | 186 // Commit immediately. |
192 { | 187 { |
193 DebugScopedSetMainThreadBlocked main_thread_blocked(this); | 188 DebugScopedSetMainThreadBlocked main_thread_blocked(this); |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 void SingleThreadProxy::DidSwapFrame() { | 537 void SingleThreadProxy::DidSwapFrame() { |
543 if (next_frame_is_newly_committed_frame_) { | 538 if (next_frame_is_newly_committed_frame_) { |
544 next_frame_is_newly_committed_frame_ = false; | 539 next_frame_is_newly_committed_frame_ = false; |
545 layer_tree_host_->DidCommitAndDrawFrame(); | 540 layer_tree_host_->DidCommitAndDrawFrame(); |
546 } | 541 } |
547 } | 542 } |
548 | 543 |
549 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 544 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
550 | 545 |
551 } // namespace cc | 546 } // namespace cc |
OLD | NEW |