| 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/base/thread.h" | 9 #include "cc/base/thread.h" |
| 10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 } | 355 } |
| 356 | 356 |
| 357 void SingleThreadProxy::ForceSerializeOnSwapBuffers() { | 357 void SingleThreadProxy::ForceSerializeOnSwapBuffers() { |
| 358 { | 358 { |
| 359 DebugScopedSetImplThread impl(this); | 359 DebugScopedSetImplThread impl(this); |
| 360 if (renderer_initialized_) | 360 if (renderer_initialized_) |
| 361 layer_tree_host_impl_->renderer()->DoNoOp(); | 361 layer_tree_host_impl_->renderer()->DoNoOp(); |
| 362 } | 362 } |
| 363 } | 363 } |
| 364 | 364 |
| 365 void SingleThreadProxy::OnSwapBuffersCompleteOnImplThread() { NOTREACHED(); } | |
| 366 | |
| 367 bool SingleThreadProxy::CommitAndComposite(base::TimeTicks frame_begin_time) { | 365 bool SingleThreadProxy::CommitAndComposite(base::TimeTicks frame_begin_time) { |
| 368 DCHECK(Proxy::IsMainThread()); | 366 DCHECK(Proxy::IsMainThread()); |
| 369 | 367 |
| 370 if (!layer_tree_host_->InitializeRendererIfNeeded()) | 368 if (!layer_tree_host_->InitializeRendererIfNeeded()) |
| 371 return false; | 369 return false; |
| 372 | 370 |
| 373 scoped_refptr<cc::ContextProvider> offscreen_context_provider; | 371 scoped_refptr<cc::ContextProvider> offscreen_context_provider; |
| 374 if (renderer_capabilities_for_main_thread_.using_offscreen_context3d && | 372 if (renderer_capabilities_for_main_thread_.using_offscreen_context3d && |
| 375 layer_tree_host_->needs_offscreen_context()) { | 373 layer_tree_host_->needs_offscreen_context()) { |
| 376 offscreen_context_provider = | 374 offscreen_context_provider = |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 444 |
| 447 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 445 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
| 448 | 446 |
| 449 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { | 447 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { |
| 450 // Impl-side painting only. | 448 // Impl-side painting only. |
| 451 NOTREACHED(); | 449 NOTREACHED(); |
| 452 return skia::RefPtr<SkPicture>(); | 450 return skia::RefPtr<SkPicture>(); |
| 453 } | 451 } |
| 454 | 452 |
| 455 } // namespace cc | 453 } // namespace cc |
| OLD | NEW |