Chromium Code Reviews| Index: cc/animation/layer_animation_controller.cc |
| diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc |
| index 911c5c426f57814305e2d69fb7ddf352290480bd..fad178e79aec8054bab54fd7d9e64890b1b308ac 100644 |
| --- a/cc/animation/layer_animation_controller.cc |
| +++ b/cc/animation/layer_animation_controller.cc |
| @@ -5,6 +5,7 @@ |
| #include "cc/animation/layer_animation_controller.h" |
| #include <algorithm> |
| +#include <vector> |
| #include "cc/animation/animation.h" |
| #include "cc/animation/animation_delegate.h" |
| @@ -494,7 +495,7 @@ bool LayerAnimationController::HasOnlyTranslationTransforms() const { |
| return true; |
| } |
| -bool LayerAnimationController::MaximumScale(float* max_scale) const { |
| +bool LayerAnimationController::MaximumTargetScale(float* max_scale) const { |
| *max_scale = 0.f; |
| for (size_t i = 0; i < animations_.size(); ++i) { |
| if (animations_[i]->is_finished() || |
| @@ -504,7 +505,7 @@ bool LayerAnimationController::MaximumScale(float* max_scale) const { |
| const TransformAnimationCurve* transform_animation_curve = |
| animations_[i]->curve()->ToTransformAnimationCurve(); |
|
ajuma
2014/10/10 13:43:07
We also need to account for animations being run i
danakj
2014/10/10 15:14:45
OK I think I have this now, thanks!
|
| float animation_scale = 0.f; |
| - if (!transform_animation_curve->MaximumScale(&animation_scale)) |
| + if (!transform_animation_curve->MaximumTargetScale(&animation_scale)) |
| return false; |
| *max_scale = std::max(*max_scale, animation_scale); |
| } |