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

Unified Diff: cc/animation/keyframed_animation_curve_unittest.cc

Issue 2971503002: Transform animations should not collapse by default when interpolating (Closed)
Patch Set: . Created 3 years, 5 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
« no previous file with comments | « cc/animation/keyframed_animation_curve.cc ('k') | cc/animation/transform_operation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/keyframed_animation_curve_unittest.cc
diff --git a/cc/animation/keyframed_animation_curve_unittest.cc b/cc/animation/keyframed_animation_curve_unittest.cc
index bf45bccbc6ffdef8e02b44d0c8ed5bba4992f2d2..f714b28341f13d4be9a94a1451a42c5ace89c127 100644
--- a/cc/animation/keyframed_animation_curve_unittest.cc
+++ b/cc/animation/keyframed_animation_curve_unittest.cc
@@ -14,8 +14,9 @@
namespace cc {
namespace {
-void ExpectTranslateX(SkMScalar translate_x, const gfx::Transform& transform) {
- EXPECT_FLOAT_EQ(translate_x, transform.matrix().get(0, 3));
+void ExpectTranslateX(SkMScalar translate_x,
+ const TransformOperations& operations) {
+ EXPECT_FLOAT_EQ(translate_x, operations.Apply().matrix().get(0, 3));
}
void ExpectBrightness(double brightness, const FilterOperations& filter) {
@@ -293,7 +294,8 @@ TEST(KeyframedAnimationCurveTest, RepeatedTransformKeyTimes) {
ExpectTranslateX(4.f, curve->GetValue(base::TimeDelta::FromSecondsD(0.5f)));
// There is a discontinuity at 1. Any value between 4 and 6 is valid.
- gfx::Transform value = curve->GetValue(base::TimeDelta::FromSecondsD(1.f));
+ gfx::Transform value =
+ curve->GetValue(base::TimeDelta::FromSecondsD(1.f)).Apply();
EXPECT_GE(value.matrix().get(0, 3), 4.f);
EXPECT_LE(value.matrix().get(0, 3), 6.f);
« no previous file with comments | « cc/animation/keyframed_animation_curve.cc ('k') | cc/animation/transform_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698