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

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') | cc/animation/transform_operation.cc » ('J')
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 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 cc::Animation::Finished, 0.0); 1252 cc::Animation::Finished, 0.0);
1253 1253
1254 // There are no longer any running animations. 1254 // There are no longer any running animations.
1255 EXPECT_TRUE(controller_impl->AnimatedBoundsForBox(box, &bounds)); 1255 EXPECT_TRUE(controller_impl->AnimatedBoundsForBox(box, &bounds));
1256 EXPECT_EQ(gfx::BoxF().ToString(), bounds.ToString()); 1256 EXPECT_EQ(gfx::BoxF().ToString(), bounds.ToString());
1257 1257
1258 // Add an animation whose bounds we don't yet support computing. 1258 // Add an animation whose bounds we don't yet support computing.
1259 scoped_ptr<KeyframedTransformAnimationCurve> curve3( 1259 scoped_ptr<KeyframedTransformAnimationCurve> curve3(
1260 KeyframedTransformAnimationCurve::Create()); 1260 KeyframedTransformAnimationCurve::Create());
1261 TransformOperations operations3; 1261 TransformOperations operations3;
1262 gfx::Transform transform3;
1263 transform3.Scale3d(1.0, 2.0, 3.0);
1262 curve3->AddKeyframe(TransformKeyframe::Create( 1264 curve3->AddKeyframe(TransformKeyframe::Create(
1263 0.0, operations3, scoped_ptr<TimingFunction>())); 1265 0.0, operations3, scoped_ptr<TimingFunction>()));
1264 operations3.AppendSkew(1.0, 2.0); 1266 operations3.AppendMatrix(transform3);
1265 curve3->AddKeyframe(TransformKeyframe::Create( 1267 curve3->AddKeyframe(TransformKeyframe::Create(
1266 1.0, operations3, scoped_ptr<TimingFunction>())); 1268 1.0, operations3, scoped_ptr<TimingFunction>()));
1267 animation = Animation::Create( 1269 animation = Animation::Create(
1268 curve3.PassAs<AnimationCurve>(), 3, 3, Animation::Transform); 1270 curve3.PassAs<AnimationCurve>(), 3, 3, Animation::Transform);
1269 controller_impl->AddAnimation(animation.Pass()); 1271 controller_impl->AddAnimation(animation.Pass());
1270 EXPECT_FALSE(controller_impl->AnimatedBoundsForBox(box, &bounds)); 1272 EXPECT_FALSE(controller_impl->AnimatedBoundsForBox(box, &bounds));
1271 } 1273 }
1272 1274
1273 } // namespace 1275 } // namespace
1274 } // namespace cc 1276 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/animation/transform_operation.cc » ('j') | cc/animation/transform_operation.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698