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

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

Issue 139233002: [#4] Pass gfx structs by const ref (gfx::PointF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected as per review comments! Created 6 years, 11 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
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/texture_layer.h » ('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 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/layers/layer_impl.h" 9 #include "cc/layers/layer_impl.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
11 #include "cc/test/fake_layer_tree_host_impl.h" 11 #include "cc/test/fake_layer_tree_host_impl.h"
12 #include "cc/test/geometry_test_utils.h" 12 #include "cc/test/geometry_test_utils.h"
13 #include "cc/trees/layer_tree_host_common.h" 13 #include "cc/trees/layer_tree_host_common.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace cc { 16 namespace cc {
17 namespace { 17 namespace {
18 18
19 void SetLayerPropertiesForTesting(LayerImpl* layer, 19 void SetLayerPropertiesForTesting(LayerImpl* layer,
20 const gfx::Transform& transform, 20 const gfx::Transform& transform,
21 const gfx::Transform& sublayer_transform, 21 const gfx::Transform& sublayer_transform,
22 gfx::PointF anchor, 22 const gfx::PointF& anchor,
23 gfx::PointF position, 23 const gfx::PointF& position,
24 gfx::Size bounds, 24 gfx::Size bounds,
25 bool preserves3d) { 25 bool preserves3d) {
26 layer->SetTransform(transform); 26 layer->SetTransform(transform);
27 layer->SetSublayerTransform(sublayer_transform); 27 layer->SetSublayerTransform(sublayer_transform);
28 layer->SetAnchorPoint(anchor); 28 layer->SetAnchorPoint(anchor);
29 layer->SetPosition(position); 29 layer->SetPosition(position);
30 layer->SetBounds(bounds); 30 layer->SetBounds(bounds);
31 layer->SetPreserves3d(preserves3d); 31 layer->SetPreserves3d(preserves3d);
32 layer->SetContentBounds(bounds); 32 layer->SetContentBounds(bounds);
33 } 33 }
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 1204
1205 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_container2_transform, 1205 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_container2_transform,
1206 container2->draw_transform()); 1206 container2->draw_transform());
1207 1207
1208 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_to_container2_transform, 1208 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_to_container2_transform,
1209 fixed_to_container2->draw_transform()); 1209 fixed_to_container2->draw_transform());
1210 } 1210 }
1211 1211
1212 } // namespace 1212 } // namespace
1213 } // namespace cc 1213 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/texture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698