| 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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 animate)); | 1150 animate)); |
| 1151 } | 1151 } |
| 1152 | 1152 |
| 1153 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { | 1153 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { |
| 1154 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1154 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
| 1155 state->Set("proxy", proxy_->AsValue().release()); | 1155 state->Set("proxy", proxy_->AsValue().release()); |
| 1156 return state.PassAs<base::Value>(); | 1156 return state.PassAs<base::Value>(); |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 void LayerTreeHost::AnimateLayers(base::TimeTicks time) { | 1159 void LayerTreeHost::AnimateLayers(base::TimeTicks time) { |
| 1160 rendering_stats_instrumentation_->IncrementAnimationFrameCount(); | |
| 1161 if (!settings_.accelerated_animation_enabled || | 1160 if (!settings_.accelerated_animation_enabled || |
| 1162 animation_registrar_->active_animation_controllers().empty()) | 1161 animation_registrar_->active_animation_controllers().empty()) |
| 1163 return; | 1162 return; |
| 1164 | 1163 |
| 1165 TRACE_EVENT0("cc", "LayerTreeHost::AnimateLayers"); | 1164 TRACE_EVENT0("cc", "LayerTreeHost::AnimateLayers"); |
| 1166 | 1165 |
| 1167 double monotonic_time = (time - base::TimeTicks()).InSecondsF(); | 1166 double monotonic_time = (time - base::TimeTicks()).InSecondsF(); |
| 1168 | 1167 |
| 1169 AnimationRegistrar::AnimationControllerMap copy = | 1168 AnimationRegistrar::AnimationControllerMap copy = |
| 1170 animation_registrar_->active_animation_controllers(); | 1169 animation_registrar_->active_animation_controllers(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1236 void LayerTreeHost::RegisterViewportLayers( | 1235 void LayerTreeHost::RegisterViewportLayers( |
| 1237 scoped_refptr<Layer> page_scale_layer, | 1236 scoped_refptr<Layer> page_scale_layer, |
| 1238 scoped_refptr<Layer> inner_viewport_scroll_layer, | 1237 scoped_refptr<Layer> inner_viewport_scroll_layer, |
| 1239 scoped_refptr<Layer> outer_viewport_scroll_layer) { | 1238 scoped_refptr<Layer> outer_viewport_scroll_layer) { |
| 1240 page_scale_layer_ = page_scale_layer; | 1239 page_scale_layer_ = page_scale_layer; |
| 1241 inner_viewport_scroll_layer_ = inner_viewport_scroll_layer; | 1240 inner_viewport_scroll_layer_ = inner_viewport_scroll_layer; |
| 1242 outer_viewport_scroll_layer_ = outer_viewport_scroll_layer; | 1241 outer_viewport_scroll_layer_ = outer_viewport_scroll_layer; |
| 1243 } | 1242 } |
| 1244 | 1243 |
| 1245 } // namespace cc | 1244 } // namespace cc |
| OLD | NEW |