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

Unified Diff: cc/animation/keyframed_animation_curve_unittest.cc

Issue 2971503002: Transform animations should not collapse by default when interpolating (Closed)
Patch Set: try again Created 3 years, 6 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_unittest.cc
diff --git a/cc/animation/keyframed_animation_curve_unittest.cc b/cc/animation/keyframed_animation_curve_unittest.cc
index c050404d7143584645a08d11d96c3b98c3c83be5..766c39d8abe3211ca4399280b4fd96d52f5e22d4 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);

Powered by Google App Engine
This is Rietveld 408576698