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/single_thread_proxy.h" | 5 #include "cc/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/context_provider.h" | 9 #include "cc/context_provider.h" |
10 #include "cc/draw_quad.h" | 10 #include "cc/draw_quad.h" |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 } | 359 } |
360 | 360 |
361 void SingleThreadProxy::ForceSerializeOnSwapBuffers() { | 361 void SingleThreadProxy::ForceSerializeOnSwapBuffers() { |
362 { | 362 { |
363 DebugScopedSetImplThread impl(this); | 363 DebugScopedSetImplThread impl(this); |
364 if (renderer_initialized_) | 364 if (renderer_initialized_) |
365 layer_tree_host_impl_->renderer()->DoNoOp(); | 365 layer_tree_host_impl_->renderer()->DoNoOp(); |
366 } | 366 } |
367 } | 367 } |
368 | 368 |
369 void SingleThreadProxy::OnSwapBuffersCompleteOnImplThread() { NOTREACHED(); } | |
370 | |
371 bool SingleThreadProxy::CommitAndComposite() { | 369 bool SingleThreadProxy::CommitAndComposite() { |
372 DCHECK(Proxy::IsMainThread()); | 370 DCHECK(Proxy::IsMainThread()); |
373 | 371 |
374 if (!layer_tree_host_->InitializeRendererIfNeeded()) | 372 if (!layer_tree_host_->InitializeRendererIfNeeded()) |
375 return false; | 373 return false; |
376 | 374 |
377 scoped_refptr<cc::ContextProvider> offscreen_context_provider; | 375 scoped_refptr<cc::ContextProvider> offscreen_context_provider; |
378 if (renderer_capabilities_for_main_thread_.using_offscreen_context3d && | 376 if (renderer_capabilities_for_main_thread_.using_offscreen_context3d && |
379 layer_tree_host_->needs_offscreen_context()) { | 377 layer_tree_host_->needs_offscreen_context()) { |
380 offscreen_context_provider = | 378 offscreen_context_provider = |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 | 449 |
452 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 450 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
453 | 451 |
454 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { | 452 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { |
455 // Impl-side painting only. | 453 // Impl-side painting only. |
456 NOTREACHED(); | 454 NOTREACHED(); |
457 return skia::RefPtr<SkPicture>(); | 455 return skia::RefPtr<SkPicture>(); |
458 } | 456 } |
459 | 457 |
460 } // namespace cc | 458 } // namespace cc |
OLD | NEW |