| 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" |
| 11 #include "cc/output/output_surface.h" | 11 #include "cc/output/output_surface.h" |
| 12 #include "cc/quads/draw_quad.h" | 12 #include "cc/quads/draw_quad.h" |
| 13 #include "cc/resources/prioritized_resource_manager.h" | 13 #include "cc/resources/prioritized_resource_manager.h" |
| 14 #include "cc/resources/resource_update_controller.h" | 14 #include "cc/resources/resource_update_controller.h" |
| 15 #include "cc/trees/layer_tree_host.h" | 15 #include "cc/trees/layer_tree_host.h" |
| 16 #include "cc/trees/layer_tree_impl.h" | 16 #include "cc/trees/layer_tree_impl.h" |
| 17 | 17 |
| 18 namespace cc { | 18 namespace cc { |
| 19 | 19 |
| 20 scoped_ptr<Proxy> SingleThreadProxy::Create(LayerTreeHost* layer_tree_host) { | 20 scoped_ptr<Proxy> SingleThreadProxy::Create(LayerTreeHost* layer_tree_host) { |
| 21 return make_scoped_ptr( | 21 return make_scoped_ptr( |
| 22 new SingleThreadProxy(layer_tree_host)).PassAs<Proxy>(); | 22 new SingleThreadProxy(layer_tree_host)).PassAs<Proxy>(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 SingleThreadProxy::SingleThreadProxy(LayerTreeHost* layer_tree_host) | 25 SingleThreadProxy::SingleThreadProxy(LayerTreeHost* layer_tree_host) |
| 26 : Proxy(scoped_ptr<Thread>(NULL)), | 26 : Proxy(scoped_ptr<Thread>()), |
| 27 layer_tree_host_(layer_tree_host), | 27 layer_tree_host_(layer_tree_host), |
| 28 created_offscreen_context_provider_(false), | 28 created_offscreen_context_provider_(false), |
| 29 next_frame_is_newly_committed_frame_(false), | 29 next_frame_is_newly_committed_frame_(false), |
| 30 inside_draw_(false) { | 30 inside_draw_(false) { |
| 31 TRACE_EVENT0("cc", "SingleThreadProxy::SingleThreadProxy"); | 31 TRACE_EVENT0("cc", "SingleThreadProxy::SingleThreadProxy"); |
| 32 DCHECK(Proxy::IsMainThread()); | 32 DCHECK(Proxy::IsMainThread()); |
| 33 DCHECK(layer_tree_host); | 33 DCHECK(layer_tree_host); |
| 34 | 34 |
| 35 // Impl-side painting not supported without threaded compositing. | 35 // Impl-side painting not supported without threaded compositing. |
| 36 CHECK(!layer_tree_host->settings().impl_side_painting) | 36 CHECK(!layer_tree_host->settings().impl_side_painting) |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 | 486 |
| 487 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 487 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
| 488 | 488 |
| 489 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { | 489 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { |
| 490 // Impl-side painting only. | 490 // Impl-side painting only. |
| 491 NOTREACHED(); | 491 NOTREACHED(); |
| 492 return skia::RefPtr<SkPicture>(); | 492 return skia::RefPtr<SkPicture>(); |
| 493 } | 493 } |
| 494 | 494 |
| 495 } // namespace cc | 495 } // namespace cc |
| OLD | NEW |