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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 animate)); | 1157 animate)); |
1158 } | 1158 } |
1159 | 1159 |
1160 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { | 1160 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { |
1161 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1161 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1162 state->Set("proxy", proxy_->AsValue().release()); | 1162 state->Set("proxy", proxy_->AsValue().release()); |
1163 return state.PassAs<base::Value>(); | 1163 return state.PassAs<base::Value>(); |
1164 } | 1164 } |
1165 | 1165 |
1166 void LayerTreeHost::AnimateLayers(base::TimeTicks time) { | 1166 void LayerTreeHost::AnimateLayers(base::TimeTicks time) { |
1167 rendering_stats_instrumentation_->IncrementAnimationFrameCount(); | |
1168 if (!settings_.accelerated_animation_enabled || | 1167 if (!settings_.accelerated_animation_enabled || |
1169 animation_registrar_->active_animation_controllers().empty()) | 1168 animation_registrar_->active_animation_controllers().empty()) |
1170 return; | 1169 return; |
1171 | 1170 |
1172 TRACE_EVENT0("cc", "LayerTreeHost::AnimateLayers"); | 1171 TRACE_EVENT0("cc", "LayerTreeHost::AnimateLayers"); |
1173 | 1172 |
1174 double monotonic_time = (time - base::TimeTicks()).InSecondsF(); | 1173 double monotonic_time = (time - base::TimeTicks()).InSecondsF(); |
1175 | 1174 |
1176 AnimationRegistrar::AnimationControllerMap copy = | 1175 AnimationRegistrar::AnimationControllerMap copy = |
1177 animation_registrar_->active_animation_controllers(); | 1176 animation_registrar_->active_animation_controllers(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 void LayerTreeHost::RegisterViewportLayers( | 1242 void LayerTreeHost::RegisterViewportLayers( |
1244 scoped_refptr<Layer> page_scale_layer, | 1243 scoped_refptr<Layer> page_scale_layer, |
1245 scoped_refptr<Layer> inner_viewport_scroll_layer, | 1244 scoped_refptr<Layer> inner_viewport_scroll_layer, |
1246 scoped_refptr<Layer> outer_viewport_scroll_layer) { | 1245 scoped_refptr<Layer> outer_viewport_scroll_layer) { |
1247 page_scale_layer_ = page_scale_layer; | 1246 page_scale_layer_ = page_scale_layer; |
1248 inner_viewport_scroll_layer_ = inner_viewport_scroll_layer; | 1247 inner_viewport_scroll_layer_ = inner_viewport_scroll_layer; |
1249 outer_viewport_scroll_layer_ = outer_viewport_scroll_layer; | 1248 outer_viewport_scroll_layer_ = outer_viewport_scroll_layer; |
1250 } | 1249 } |
1251 | 1250 |
1252 } // namespace cc | 1251 } // namespace cc |
OLD | NEW |