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

Unified Diff: cc/layer_tree_host_common_unittest.cc

Issue 11491003: Revert 171714 - Use an auxiliary list of animation controllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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/layer_tree_host.cc ('k') | cc/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_common_unittest.cc
diff --git a/cc/layer_tree_host_common_unittest.cc b/cc/layer_tree_host_common_unittest.cc
index 3964a1a441d761d6aeb5e9be0dcc1293f22ade37..a3dffad48e96047e8ea47b0ed9a51a58ce7d4c99 100644
--- a/cc/layer_tree_host_common_unittest.cc
+++ b/cc/layer_tree_host_common_unittest.cc
@@ -1702,11 +1702,24 @@ TEST(LayerTreeHostCommonTest, verifyAnimationsForRenderSurfaceHierarchy)
renderSurface1->setForceRenderSurface(true);
renderSurface2->setForceRenderSurface(true);
+ // Put an animated opacity on the render surface.
+ addOpacityTransitionToController(*renderSurface1->layerAnimationController(), 10, 1, 0, false);
+
+ // Also put an animated opacity on a layer without descendants.
+ addOpacityTransitionToController(*grandChildOfRoot->layerAnimationController(), 10, 1, 0, false);
+
gfx::Transform layerTransform;
layerTransform.Translate(1, 1);
gfx::Transform sublayerTransform;
sublayerTransform.Scale3d(10, 1, 1);
+ // Put a transform animation on the render surface.
+ addAnimatedTransformToController(*renderSurface2->layerAnimationController(), 10, 30, 0);
+
+ // Also put transform animations on grandChildOfRoot, and grandChildOfRS2
+ addAnimatedTransformToController(*grandChildOfRoot->layerAnimationController(), 10, 30, 0);
+ addAnimatedTransformToController(*grandChildOfRS2->layerAnimationController(), 10, 30, 0);
+
setLayerPropertiesForTesting(parent.get(), layerTransform, sublayerTransform, gfx::PointF(0.25, 0), gfx::PointF(2.5, 0), gfx::Size(10, 10), false);
setLayerPropertiesForTesting(renderSurface1.get(), layerTransform, sublayerTransform, gfx::PointF(0.25, 0), gfx::PointF(2.5, 0), gfx::Size(10, 10), false);
setLayerPropertiesForTesting(renderSurface2.get(), layerTransform, sublayerTransform, gfx::PointF(0.25, 0), gfx::PointF(2.5, 0), gfx::Size(10, 10), false);
@@ -1717,19 +1730,6 @@ TEST(LayerTreeHostCommonTest, verifyAnimationsForRenderSurfaceHierarchy)
setLayerPropertiesForTesting(grandChildOfRS1.get(), layerTransform, sublayerTransform, gfx::PointF(0.25, 0), gfx::PointF(2.5, 0), gfx::Size(10, 10), false);
setLayerPropertiesForTesting(grandChildOfRS2.get(), layerTransform, sublayerTransform, gfx::PointF(0.25, 0), gfx::PointF(2.5, 0), gfx::Size(10, 10), false);
- // Put an animated opacity on the render surface.
- addOpacityTransitionToController(*renderSurface1->layerAnimationController(), 10, 1, 0, false);
-
- // Also put an animated opacity on a layer without descendants.
- addOpacityTransitionToController(*grandChildOfRoot->layerAnimationController(), 10, 1, 0, false);
-
- // Put a transform animation on the render surface.
- addAnimatedTransformToController(*renderSurface2->layerAnimationController(), 10, 30, 0);
-
- // Also put transform animations on grandChildOfRoot, and grandChildOfRS2
- addAnimatedTransformToController(*grandChildOfRoot->layerAnimationController(), 10, 30, 0);
- addAnimatedTransformToController(*grandChildOfRS2->layerAnimationController(), 10, 30, 0);
-
executeCalculateDrawProperties(parent.get());
// Only layers that are associated with render surfaces should have an actual renderSurface() value.
« no previous file with comments | « cc/layer_tree_host.cc ('k') | cc/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698