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

Side by Side Diff: cc/animation/layer_animation_controller_unittest.cc

Issue 55763004: Allow the computation of inflated bounds for non matrix transform operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/animation/transform_operation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/animation/layer_animation_controller.h" 5 #include "cc/animation/layer_animation_controller.h"
6 6
7 #include "cc/animation/animation.h" 7 #include "cc/animation/animation.h"
8 #include "cc/animation/animation_curve.h" 8 #include "cc/animation/animation_curve.h"
9 #include "cc/animation/animation_delegate.h" 9 #include "cc/animation/animation_delegate.h"
10 #include "cc/animation/keyframed_animation_curve.h" 10 #include "cc/animation/keyframed_animation_curve.h"
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 cc::Animation::Finished, 0.0); 1253 cc::Animation::Finished, 0.0);
1254 1254
1255 // There are no longer any running animations. 1255 // There are no longer any running animations.
1256 EXPECT_TRUE(controller_impl->AnimatedBoundsForBox(box, &bounds)); 1256 EXPECT_TRUE(controller_impl->AnimatedBoundsForBox(box, &bounds));
1257 EXPECT_EQ(gfx::BoxF().ToString(), bounds.ToString()); 1257 EXPECT_EQ(gfx::BoxF().ToString(), bounds.ToString());
1258 1258
1259 // Add an animation whose bounds we don't yet support computing. 1259 // Add an animation whose bounds we don't yet support computing.
1260 scoped_ptr<KeyframedTransformAnimationCurve> curve3( 1260 scoped_ptr<KeyframedTransformAnimationCurve> curve3(
1261 KeyframedTransformAnimationCurve::Create()); 1261 KeyframedTransformAnimationCurve::Create());
1262 TransformOperations operations3; 1262 TransformOperations operations3;
1263 gfx::Transform transform3;
1264 transform3.Scale3d(1.0, 2.0, 3.0);
1263 curve3->AddKeyframe(TransformKeyframe::Create( 1265 curve3->AddKeyframe(TransformKeyframe::Create(
1264 0.0, operations3, scoped_ptr<TimingFunction>())); 1266 0.0, operations3, scoped_ptr<TimingFunction>()));
1265 operations3.AppendSkew(1.0, 2.0); 1267 operations3.AppendMatrix(transform3);
1266 curve3->AddKeyframe(TransformKeyframe::Create( 1268 curve3->AddKeyframe(TransformKeyframe::Create(
1267 1.0, operations3, scoped_ptr<TimingFunction>())); 1269 1.0, operations3, scoped_ptr<TimingFunction>()));
1268 animation = Animation::Create( 1270 animation = Animation::Create(
1269 curve3.PassAs<AnimationCurve>(), 3, 3, Animation::Transform); 1271 curve3.PassAs<AnimationCurve>(), 3, 3, Animation::Transform);
1270 controller_impl->AddAnimation(animation.Pass()); 1272 controller_impl->AddAnimation(animation.Pass());
1271 EXPECT_FALSE(controller_impl->AnimatedBoundsForBox(box, &bounds)); 1273 EXPECT_FALSE(controller_impl->AnimatedBoundsForBox(box, &bounds));
1272 } 1274 }
1273 1275
1274 } // namespace 1276 } // namespace
1275 } // namespace cc 1277 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/animation/transform_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698