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 11 matching lines...) Expand all Loading... |
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>(NULL)), |
27 layer_tree_host_(layer_tree_host), | 27 layer_tree_host_(layer_tree_host), |
28 output_surface_lost_(false), | 28 output_surface_lost_(false), |
29 created_offscreen_context_provider_(false), | 29 created_offscreen_context_provider_(false), |
30 renderer_initialized_(false), | 30 renderer_initialized_(false), |
31 next_frame_is_newly_committed_frame_(false), | 31 next_frame_is_newly_committed_frame_(false), |
32 inside_draw_(false), | 32 inside_draw_(false) { |
33 total_commit_count_(0) { | |
34 TRACE_EVENT0("cc", "SingleThreadProxy::SingleThreadProxy"); | 33 TRACE_EVENT0("cc", "SingleThreadProxy::SingleThreadProxy"); |
35 DCHECK(Proxy::IsMainThread()); | 34 DCHECK(Proxy::IsMainThread()); |
36 DCHECK(layer_tree_host); | 35 DCHECK(layer_tree_host); |
37 | 36 |
38 // Impl-side painting not supported without threaded compositing. | 37 // Impl-side painting not supported without threaded compositing. |
39 CHECK(!layer_tree_host->settings().impl_side_painting); | 38 CHECK(!layer_tree_host->settings().impl_side_painting); |
40 } | 39 } |
41 | 40 |
42 void SingleThreadProxy::Start() { | 41 void SingleThreadProxy::Start() { |
43 DebugScopedSetImplThread impl(this); | 42 DebugScopedSetImplThread impl(this); |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 445 |
447 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 446 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
448 | 447 |
449 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { | 448 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { |
450 // Impl-side painting only. | 449 // Impl-side painting only. |
451 NOTREACHED(); | 450 NOTREACHED(); |
452 return skia::RefPtr<SkPicture>(); | 451 return skia::RefPtr<SkPicture>(); |
453 } | 452 } |
454 | 453 |
455 } // namespace cc | 454 } // namespace cc |
OLD | NEW |