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

Side by Side Diff: cc/test/layer_tree_host_common_test.h

Issue 2179263002: cc: Remove SetLayerPropertiesForTesting from LayerTreeHostCommonTestBase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lthcommontest-harness
Patch Set: lthcommontest-harness2: rebase Created 4 years, 4 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 | « no previous file | cc/test/layer_tree_host_common_test.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ 5 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ 6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 15 matching lines...) Expand all
26 namespace cc { 26 namespace cc {
27 27
28 class Layer; 28 class Layer;
29 class LayerImpl; 29 class LayerImpl;
30 30
31 class LayerTreeHostCommonTestBase : public LayerTestCommon::LayerImplTest { 31 class LayerTreeHostCommonTestBase : public LayerTestCommon::LayerImplTest {
32 protected: 32 protected:
33 explicit LayerTreeHostCommonTestBase(const LayerTreeSettings& settings); 33 explicit LayerTreeHostCommonTestBase(const LayerTreeSettings& settings);
34 virtual ~LayerTreeHostCommonTestBase(); 34 virtual ~LayerTreeHostCommonTestBase();
35 35
36 template <typename LayerType>
37 void SetLayerPropertiesForTestingInternal(
38 LayerType* layer,
39 const gfx::Transform& transform,
40 const gfx::PointF& position,
41 const gfx::Size& bounds,
42 bool is_3d_sorted) {
43 layer->SetTransform(transform);
44 layer->SetPosition(position);
45 layer->SetBounds(bounds);
46 layer->Set3dSortingContextId(is_3d_sorted ? 1 : 0);
47 }
48
49 void SetLayerPropertiesForTesting(Layer* layer,
50 const gfx::Transform& transform,
51 const gfx::Point3F& transform_origin,
52 const gfx::PointF& position,
53 const gfx::Size& bounds,
54 bool flatten_transform,
55 bool is_3d_sorted);
56
57 void SetLayerPropertiesForTesting(LayerImpl* layer,
58 const gfx::Transform& transform,
59 const gfx::Point3F& transform_origin,
60 const gfx::PointF& position,
61 const gfx::Size& bounds,
62 bool flatten_transform,
63 bool is_3d_sorted);
64
65 void SetLayerPropertiesForTesting(LayerImpl* layer,
66 const gfx::Transform& transform,
67 const gfx::Point3F& transform_origin,
68 const gfx::PointF& position,
69 const gfx::Size& bounds,
70 bool flatten_transform,
71 bool is_3d_sorted,
72 bool create_render_surface);
73
74 void ExecuteCalculateDrawProperties(Layer* root_layer, 36 void ExecuteCalculateDrawProperties(Layer* root_layer,
75 float device_scale_factor, 37 float device_scale_factor,
76 float page_scale_factor, 38 float page_scale_factor,
77 Layer* page_scale_application_layer); 39 Layer* page_scale_application_layer);
78 40
79 void ExecuteCalculateDrawProperties(LayerImpl* root_layer, 41 void ExecuteCalculateDrawProperties(LayerImpl* root_layer,
80 float device_scale_factor, 42 float device_scale_factor,
81 float page_scale_factor, 43 float page_scale_factor,
82 LayerImpl* page_scale_application_layer); 44 LayerImpl* page_scale_application_layer);
83 45
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 LayerTreeSettings LayerTreeHostCommonTestSettings() { 122 LayerTreeSettings LayerTreeHostCommonTestSettings() {
161 LayerTreeSettings settings; 123 LayerTreeSettings settings;
162 settings.verify_transform_tree_calculations = true; 124 settings.verify_transform_tree_calculations = true;
163 return settings; 125 return settings;
164 } 126 }
165 }; 127 };
166 128
167 } // namespace cc 129 } // namespace cc
168 130
169 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ 131 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | cc/test/layer_tree_host_common_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698