Index: cc/animation/keyframed_animation_curve.cc |
diff --git a/cc/animation/keyframed_animation_curve.cc b/cc/animation/keyframed_animation_curve.cc |
index bf65df8f20f00ca694b0f7b604ece794f76fdede..adc6f91cab90ff1d73c2e8e60427dac11b5849f8 100644 |
--- a/cc/animation/keyframed_animation_curve.cc |
+++ b/cc/animation/keyframed_animation_curve.cc |
@@ -379,7 +379,27 @@ bool KeyframedTransformAnimationCurve::IsTranslation() const { |
} |
return true; |
} |
+bool KeyframedTransformAnimationCurve::AnimationStartScale( |
+ bool forward_direction, |
+ float* start_scale) const { |
+ DCHECK_GE(keyframes_.size(), 2ul); |
+ *start_scale = 0.f; |
+ size_t start_location = 0; |
+ if (!forward_direction) { |
+ start_location = keyframes_.size() - 1; |
+ } |
+ gfx::Vector3dF target_scale_for_segment; |
ajuma
2015/04/23 19:17:01
start_scale_for_segment?
patro
2015/04/24 11:47:27
Done.
|
+ if (!keyframes_[start_location]->Value().ScaleComponent( |
+ &target_scale_for_segment)) |
+ return false; |
+ float start_scale_for_segment = |
+ fmax(std::abs(target_scale_for_segment.x()), |
+ fmax(std::abs(target_scale_for_segment.y()), |
+ std::abs(target_scale_for_segment.z()))); |
+ *start_scale = fmax(*start_scale, start_scale_for_segment); |
+ return true; |
+} |
bool KeyframedTransformAnimationCurve::MaximumTargetScale( |
bool forward_direction, |
float* max_scale) const { |