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

Side by Side Diff: cc/layers/layer_position_constraint_unittest.cc

Issue 2834123002: cc: Replace render surface layer list with a render surface list (Closed)
Patch Set: . Created 3 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/layers/layer_position_constraint.h" 5 #include "cc/layers/layer_position_constraint.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/animation/animation_host.h" 9 #include "cc/animation/animation_host.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 29 matching lines...) Expand all
40 const gfx::Size& bounds, 40 const gfx::Size& bounds,
41 bool flatten_transform) { 41 bool flatten_transform) {
42 layer->SetTransform(transform); 42 layer->SetTransform(transform);
43 layer->SetTransformOrigin(transform_origin); 43 layer->SetTransformOrigin(transform_origin);
44 layer->SetPosition(position); 44 layer->SetPosition(position);
45 layer->SetBounds(bounds); 45 layer->SetBounds(bounds);
46 layer->SetShouldFlattenTransform(flatten_transform); 46 layer->SetShouldFlattenTransform(flatten_transform);
47 } 47 }
48 48
49 void ExecuteCalculateDrawProperties(LayerImpl* root_layer) { 49 void ExecuteCalculateDrawProperties(LayerImpl* root_layer) {
50 std::vector<LayerImpl*> dummy_render_surface_layer_list; 50 RenderSurfaceList dummy_render_surface_list;
51 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( 51 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
52 root_layer, root_layer->bounds(), &dummy_render_surface_layer_list); 52 root_layer, root_layer->bounds(), &dummy_render_surface_list);
53 inputs.inner_viewport_scroll_layer = 53 inputs.inner_viewport_scroll_layer =
54 root_layer->layer_tree_impl()->InnerViewportScrollLayer(); 54 root_layer->layer_tree_impl()->InnerViewportScrollLayer();
55 inputs.outer_viewport_scroll_layer = 55 inputs.outer_viewport_scroll_layer =
56 root_layer->layer_tree_impl()->OuterViewportScrollLayer(); 56 root_layer->layer_tree_impl()->OuterViewportScrollLayer();
57 EXPECT_FALSE(root_layer->layer_tree_impl()->property_trees()->needs_rebuild); 57 EXPECT_FALSE(root_layer->layer_tree_impl()->property_trees()->needs_rebuild);
58 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 58 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
59 } 59 }
60 60
61 class LayerPositionConstraintTest : public testing::Test { 61 class LayerPositionConstraintTest : public testing::Test {
62 public: 62 public:
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 expected_fixed_child_transform.Translate(20.0, 20.0); 1144 expected_fixed_child_transform.Translate(20.0, 20.0);
1145 1145
1146 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_scroll_layer_transform, 1146 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_scroll_layer_transform,
1147 scroll_layer_impl_->DrawTransform()); 1147 scroll_layer_impl_->DrawTransform());
1148 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_child_transform, 1148 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_child_transform,
1149 fixed_child_impl->DrawTransform()); 1149 fixed_child_impl->DrawTransform());
1150 } 1150 }
1151 1151
1152 } // namespace 1152 } // namespace
1153 } // namespace cc 1153 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698