| 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 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 | 1142 |
| 1143 void LayerTreeHost::SetLayerScrollOffsetMutated( | 1143 void LayerTreeHost::SetLayerScrollOffsetMutated( |
| 1144 int layer_id, | 1144 int layer_id, |
| 1145 LayerTreeType tree_type, | 1145 LayerTreeType tree_type, |
| 1146 const gfx::ScrollOffset& scroll_offset) { | 1146 const gfx::ScrollOffset& scroll_offset) { |
| 1147 LayerAnimationValueObserver* layer = LayerById(layer_id); | 1147 LayerAnimationValueObserver* layer = LayerById(layer_id); |
| 1148 DCHECK(layer); | 1148 DCHECK(layer); |
| 1149 layer->OnScrollOffsetAnimated(scroll_offset); | 1149 layer->OnScrollOffsetAnimated(scroll_offset); |
| 1150 } | 1150 } |
| 1151 | 1151 |
| 1152 gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation( |
| 1153 int layer_id) const { |
| 1154 LayerAnimationValueProvider* layer = LayerById(layer_id); |
| 1155 DCHECK(layer); |
| 1156 return layer->ScrollOffsetForAnimation(); |
| 1157 } |
| 1158 |
| 1152 bool LayerTreeHost::ScrollOffsetAnimationWasInterrupted( | 1159 bool LayerTreeHost::ScrollOffsetAnimationWasInterrupted( |
| 1153 const Layer* layer) const { | 1160 const Layer* layer) const { |
| 1154 return animation_host_ | 1161 return animation_host_ |
| 1155 ? animation_host_->ScrollOffsetAnimationWasInterrupted(layer->id()) | 1162 ? animation_host_->ScrollOffsetAnimationWasInterrupted(layer->id()) |
| 1156 : false; | 1163 : false; |
| 1157 } | 1164 } |
| 1158 | 1165 |
| 1159 bool LayerTreeHost::IsAnimatingFilterProperty(const Layer* layer) const { | 1166 bool LayerTreeHost::IsAnimatingFilterProperty(const Layer* layer) const { |
| 1160 return animation_host_ | 1167 return animation_host_ |
| 1161 ? animation_host_->IsAnimatingFilterProperty(layer->id()) | 1168 ? animation_host_->IsAnimatingFilterProperty(layer->id()) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) | 1207 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) |
| 1201 : false; | 1208 : false; |
| 1202 } | 1209 } |
| 1203 | 1210 |
| 1204 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { | 1211 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { |
| 1205 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) | 1212 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) |
| 1206 : false; | 1213 : false; |
| 1207 } | 1214 } |
| 1208 | 1215 |
| 1209 } // namespace cc | 1216 } // namespace cc |
| OLD | NEW |