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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 size_t SingleThreadProxy::MaxPartialTextureUpdates() const { | 236 size_t SingleThreadProxy::MaxPartialTextureUpdates() const { |
237 return std::numeric_limits<size_t>::max(); | 237 return std::numeric_limits<size_t>::max(); |
238 } | 238 } |
239 | 239 |
240 void SingleThreadProxy::Stop() { | 240 void SingleThreadProxy::Stop() { |
241 TRACE_EVENT0("cc", "SingleThreadProxy::stop"); | 241 TRACE_EVENT0("cc", "SingleThreadProxy::stop"); |
242 DCHECK(Proxy::IsMainThread()); | 242 DCHECK(Proxy::IsMainThread()); |
243 { | 243 { |
244 DebugScopedSetMainThreadBlocked main_thread_blocked(this); | 244 DebugScopedSetMainThreadBlocked main_thread_blocked(this); |
245 DebugScopedSetImplThread impl(this); | 245 DebugScopedSetImplThread impl(this); |
| 246 BlockingTaskRunner::CapturePostTasks blocked; |
246 | 247 |
247 layer_tree_host_->DeleteContentsTexturesOnImplThread( | 248 layer_tree_host_->DeleteContentsTexturesOnImplThread( |
248 layer_tree_host_impl_->resource_provider()); | 249 layer_tree_host_impl_->resource_provider()); |
249 layer_tree_host_impl_.reset(); | 250 layer_tree_host_impl_.reset(); |
250 } | 251 } |
251 layer_tree_host_ = NULL; | 252 layer_tree_host_ = NULL; |
252 } | 253 } |
253 | 254 |
254 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { | 255 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { |
255 TRACE_EVENT1( | 256 TRACE_EVENT1( |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 void SingleThreadProxy::DidSwapFrame() { | 513 void SingleThreadProxy::DidSwapFrame() { |
513 if (next_frame_is_newly_committed_frame_) { | 514 if (next_frame_is_newly_committed_frame_) { |
514 next_frame_is_newly_committed_frame_ = false; | 515 next_frame_is_newly_committed_frame_ = false; |
515 layer_tree_host_->DidCommitAndDrawFrame(); | 516 layer_tree_host_->DidCommitAndDrawFrame(); |
516 } | 517 } |
517 } | 518 } |
518 | 519 |
519 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 520 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
520 | 521 |
521 } // namespace cc | 522 } // namespace cc |
OLD | NEW |