summaryrefslogtreecommitdiffstats
path: root/ui/compositor/layer_animator_unittest.cc
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 20:26:19 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 20:26:19 +0000
commit65ec6e7c262e144a70d7ac5279ea52eb67dcd035 (patch)
treebaa14b8192b606723d71f9f02230b3c3f11ad43c /ui/compositor/layer_animator_unittest.cc
parentb285d5aa48db2fbd9cf9a7224e43c7bceb902280 (diff)
downloadchromium_src-65ec6e7c262e144a70d7ac5279ea52eb67dcd035.zip
chromium_src-65ec6e7c262e144a70d7ac5279ea52eb67dcd035.tar.gz
chromium_src-65ec6e7c262e144a70d7ac5279ea52eb67dcd035.tar.bz2
Revert 222839 "Make inverse transform animations easier to creat..."
Causes LayerAnimatorTest.TestScopedCounterAnimation to fail. > Make inverse transform animations easier to create, using ScopedLayerAnimationSettings. > > https://codereview.chromium.org/22861008/ Introduces inverse animations which allow layers to counter-animate against a base layer. However, manually building the animation elements is repetitive and error prone, this change makes these animations simpler to write. > > Users should use it in this manner: > > // Input values > Layer *base, *inversed1, *inversed2; > gfx::Transform new_transform; > > void foo() { > ui::ScopedLayerAnimationSettings settings(base->GetAnimator()); > settings.SetInverselyAnimatedBaseLayer(base); > settings.AddInverselyAnimatedLayer(inversed1); > settings.AddInverselyAnimatedLayer(inversed2); > > base->SetTransform(new_transform); > } > > BUG=270857 > > Review URL: https://chromiumcodereview.appspot.com/23622004 TBR=avallee@chromium.org Review URL: https://codereview.chromium.org/23578033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/compositor/layer_animator_unittest.cc')
-rw-r--r--ui/compositor/layer_animator_unittest.cc28
1 files changed, 0 insertions, 28 deletions
diff --git a/ui/compositor/layer_animator_unittest.cc b/ui/compositor/layer_animator_unittest.cc
index 8506455..5f5871f 100644
--- a/ui/compositor/layer_animator_unittest.cc
+++ b/ui/compositor/layer_animator_unittest.cc
@@ -10,7 +10,6 @@
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_delegate.h"
#include "ui/compositor/layer_animation_element.h"
#include "ui/compositor/layer_animation_sequence.h"
@@ -2376,31 +2375,4 @@ TEST(LayerAnimatorTest, TestSetterRespectEnqueueStrategy) {
EXPECT_EQ(start_opacity, delegate.GetOpacityForAnimation());
}
-TEST(LayerAnimatorTest, TestScopedCounterAnimation) {
- Layer parent, child;
- parent.Add(&child);
-
- gfx::Transform parent_begin, parent_end;
-
- parent_end.Scale3d(2.0, 0.5, 1.0);
-
- // Parent animates from identity to the end value. The counter animation will
- // start at the end value and animate back to identity.
- gfx::Transform child_begin(parent_end);
-
- child.SetTransform(child_begin);
- parent.SetTransform(parent_begin);
-
- ScopedLayerAnimationSettings settings(parent.GetAnimator());
- settings.SetInverselyAnimatedBaseLayer(&parent);
- settings.AddInverselyAnimatedLayer(&child);
-
- parent.SetTransform(parent_end);
-
- EXPECT_TRUE(child.GetTargetTransform().IsIdentity())
- << child.GetTargetTransform().ToString();
- EXPECT_TRUE(child.GetAnimator()->is_animating());
-
-}
-
} // namespace ui