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/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 if (settings_.accelerated_animation_enabled) | 100 if (settings_.accelerated_animation_enabled) |
101 animation_registrar_ = AnimationRegistrar::Create(); | 101 animation_registrar_ = AnimationRegistrar::Create(); |
102 s_num_layer_tree_instances++; | 102 s_num_layer_tree_instances++; |
103 | 103 |
104 rendering_stats_instrumentation_->set_record_rendering_stats( | 104 rendering_stats_instrumentation_->set_record_rendering_stats( |
105 debug_state_.RecordRenderingStats()); | 105 debug_state_.RecordRenderingStats()); |
106 } | 106 } |
107 | 107 |
108 bool LayerTreeHost::Initialize( | 108 bool LayerTreeHost::Initialize( |
109 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) { | 109 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) { |
110 if (impl_task_runner) | 110 if (impl_task_runner.get()) |
111 return InitializeProxy(ThreadProxy::Create(this, impl_task_runner)); | 111 return InitializeProxy(ThreadProxy::Create(this, impl_task_runner)); |
112 else | 112 else |
113 return InitializeProxy(SingleThreadProxy::Create(this)); | 113 return InitializeProxy(SingleThreadProxy::Create(this)); |
114 } | 114 } |
115 | 115 |
116 bool LayerTreeHost::InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing) { | 116 bool LayerTreeHost::InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing) { |
117 return InitializeProxy(proxy_for_testing.Pass()); | 117 return InitializeProxy(proxy_for_testing.Pass()); |
118 } | 118 } |
119 | 119 |
120 bool LayerTreeHost::InitializeProxy(scoped_ptr<Proxy> proxy) { | 120 bool LayerTreeHost::InitializeProxy(scoped_ptr<Proxy> proxy) { |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 bool start_ready_animations = true; | 1081 bool start_ready_animations = true; |
1082 (*iter).second->UpdateState(start_ready_animations, NULL); | 1082 (*iter).second->UpdateState(start_ready_animations, NULL); |
1083 } | 1083 } |
1084 } | 1084 } |
1085 | 1085 |
1086 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1086 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
1087 return proxy_->CapturePicture(); | 1087 return proxy_->CapturePicture(); |
1088 } | 1088 } |
1089 | 1089 |
1090 } // namespace cc | 1090 } // namespace cc |
OLD | NEW |