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

Side by Side Diff: cc/layer_tree_host_common_unittest.cc

Issue 12517003: cc: Chromify the Animation and LayerAnimationController classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layer_tree_host.cc ('k') | cc/layer_tree_host_impl.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_tree_host_common.h" 5 #include "cc/layer_tree_host_common.h"
6 6
7 #include "cc/content_layer.h" 7 #include "cc/content_layer.h"
8 #include "cc/content_layer_client.h" 8 #include "cc/content_layer_client.h"
9 #include "cc/heads_up_display_layer_impl.h" 9 #include "cc/heads_up_display_layer_impl.h"
10 #include "cc/layer.h" 10 #include "cc/layer.h"
(...skipping 4817 matching lines...) Expand 10 before | Expand all | Expand 10 after
4828 std::vector<scoped_refptr<Layer> > renderSurfaceLayerList; 4828 std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
4829 int dummyMaxTextureSize = 512; 4829 int dummyMaxTextureSize = 512;
4830 4830
4831 LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList); 4831 LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
4832 4832
4833 EXPECT_CONTENTS_SCALE_EQ(initialParentScale, parent); 4833 EXPECT_CONTENTS_SCALE_EQ(initialParentScale, parent);
4834 // The layers with animating transforms should not compute a contentsScale o ther than 1 until they finish animating. 4834 // The layers with animating transforms should not compute a contentsScale o ther than 1 until they finish animating.
4835 EXPECT_CONTENTS_SCALE_EQ(1, childScale); 4835 EXPECT_CONTENTS_SCALE_EQ(1, childScale);
4836 4836
4837 // Remove the animation, now it can save a raster scale. 4837 // Remove the animation, now it can save a raster scale.
4838 childScale->layerAnimationController()->removeAnimation(animationId); 4838 childScale->layerAnimationController()->RemoveAnimation(animationId);
4839 4839
4840 LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList); 4840 LayerTreeHostCommon::calculateDrawProperties(parent.get(), parent->bounds(), 1, 1, dummyMaxTextureSize, false, renderSurfaceLayerList);
4841 4841
4842 EXPECT_CONTENTS_SCALE_EQ(initialParentScale, parent); 4842 EXPECT_CONTENTS_SCALE_EQ(initialParentScale, parent);
4843 // The layers with animating transforms should not compute a contentsScale o ther than 1 until they finish animating. 4843 // The layers with animating transforms should not compute a contentsScale o ther than 1 until they finish animating.
4844 EXPECT_CONTENTS_SCALE_EQ(initialParentScale * initialChildScale, childScale) ; 4844 EXPECT_CONTENTS_SCALE_EQ(initialParentScale * initialChildScale, childScale) ;
4845 } 4845 }
4846 4846
4847 4847
4848 TEST(LayerTreeHostCommonTest, verifyRenderSurfaceTransformsInHighDPI) 4848 TEST(LayerTreeHostCommonTest, verifyRenderSurfaceTransformsInHighDPI)
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
5142 EXPECT_EQ(m_canUseLCDText, m_grandChild->canUseLCDText()); 5142 EXPECT_EQ(m_canUseLCDText, m_grandChild->canUseLCDText());
5143 } 5143 }
5144 5144
5145 INSTANTIATE_TEST_CASE_P(LayerTreeHostCommonTest, 5145 INSTANTIATE_TEST_CASE_P(LayerTreeHostCommonTest,
5146 LCDTextTest, 5146 LCDTextTest,
5147 testing::Combine(testing::Bool(), 5147 testing::Combine(testing::Bool(),
5148 testing::Bool())); 5148 testing::Bool()));
5149 5149
5150 } // namespace 5150 } // namespace
5151 } // namespace cc 5151 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host.cc ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698