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 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 next_commit_forces_redraw_(false), | 117 next_commit_forces_redraw_(false), |
118 shared_bitmap_manager_(params->shared_bitmap_manager), | 118 shared_bitmap_manager_(params->shared_bitmap_manager), |
119 gpu_memory_buffer_manager_(params->gpu_memory_buffer_manager), | 119 gpu_memory_buffer_manager_(params->gpu_memory_buffer_manager), |
120 task_graph_runner_(params->task_graph_runner), | 120 task_graph_runner_(params->task_graph_runner), |
121 surface_id_namespace_(0u), | 121 surface_id_namespace_(0u), |
122 next_surface_sequence_(1u) { | 122 next_surface_sequence_(1u) { |
123 DCHECK(task_graph_runner_); | 123 DCHECK(task_graph_runner_); |
124 | 124 |
125 if (settings_.accelerated_animation_enabled) { | 125 if (settings_.accelerated_animation_enabled) { |
126 if (settings_.use_compositor_animation_timelines) { | 126 if (settings_.use_compositor_animation_timelines) { |
127 animation_host_ = AnimationHost::Create(ThreadInstance::MAIN); | 127 animation_host_ = AnimationHost::Create(); |
128 animation_host_->SetMutatorHostClient(this); | 128 animation_host_->SetMutatorHostClient(this); |
129 } else { | 129 } else { |
130 animation_registrar_ = AnimationRegistrar::Create(); | 130 animation_registrar_ = AnimationRegistrar::Create(); |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 rendering_stats_instrumentation_->set_record_rendering_stats( | 134 rendering_stats_instrumentation_->set_record_rendering_stats( |
135 debug_state_.RecordRenderingStats()); | 135 debug_state_.RecordRenderingStats()); |
136 } | 136 } |
137 | 137 |
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) | 1200 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) |
1201 : false; | 1201 : false; |
1202 } | 1202 } |
1203 | 1203 |
1204 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { | 1204 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { |
1205 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) | 1205 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) |
1206 : false; | 1206 : false; |
1207 } | 1207 } |
1208 | 1208 |
1209 } // namespace cc | 1209 } // namespace cc |
OLD | NEW |