Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: cc/animation/keyframed_animation_curve.cc

Issue 1076313006: Animation start scale should be considered for the raster scale (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698