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

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

Issue 1908593002: cc : Stop pushing transform origin from Layer and LayerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_utils_unittest.cc ('k') | 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 21 matching lines...) Expand all
32 32
33 class LayerTreeHostCommonTestBase : public LayerTestCommon::LayerImplTest { 33 class LayerTreeHostCommonTestBase : public LayerTestCommon::LayerImplTest {
34 protected: 34 protected:
35 explicit LayerTreeHostCommonTestBase(const LayerTreeSettings& settings); 35 explicit LayerTreeHostCommonTestBase(const LayerTreeSettings& settings);
36 virtual ~LayerTreeHostCommonTestBase(); 36 virtual ~LayerTreeHostCommonTestBase();
37 37
38 template <typename LayerType> 38 template <typename LayerType>
39 void SetLayerPropertiesForTestingInternal( 39 void SetLayerPropertiesForTestingInternal(
40 LayerType* layer, 40 LayerType* layer,
41 const gfx::Transform& transform, 41 const gfx::Transform& transform,
42 const gfx::Point3F& transform_origin,
43 const gfx::PointF& position, 42 const gfx::PointF& position,
44 const gfx::Size& bounds, 43 const gfx::Size& bounds,
45 bool flatten_transform, 44 bool flatten_transform,
46 bool is_3d_sorted) { 45 bool is_3d_sorted) {
47 layer->SetTransform(transform); 46 layer->SetTransform(transform);
48 layer->SetTransformOrigin(transform_origin);
49 layer->SetPosition(position); 47 layer->SetPosition(position);
50 layer->SetBounds(bounds); 48 layer->SetBounds(bounds);
51 layer->SetShouldFlattenTransform(flatten_transform); 49 layer->SetShouldFlattenTransform(flatten_transform);
52 layer->Set3dSortingContextId(is_3d_sorted ? 1 : 0); 50 layer->Set3dSortingContextId(is_3d_sorted ? 1 : 0);
53 } 51 }
54 52
55 void SetLayerPropertiesForTesting(Layer* layer, 53 void SetLayerPropertiesForTesting(Layer* layer,
56 const gfx::Transform& transform, 54 const gfx::Transform& transform,
57 const gfx::Point3F& transform_origin, 55 const gfx::Point3F& transform_origin,
58 const gfx::PointF& position, 56 const gfx::PointF& position,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer_impl->id(), 162 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer_impl->id(),
165 delta)) 163 delta))
166 layer_impl->layer_tree_impl()->DidUpdateScrollOffset( 164 layer_impl->layer_tree_impl()->DidUpdateScrollOffset(
167 layer_impl->id(), layer_impl->transform_tree_index()); 165 layer_impl->id(), layer_impl->transform_tree_index());
168 } 166 }
169 }; 167 };
170 168
171 } // namespace cc 169 } // namespace cc
172 170
173 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ 171 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
OLDNEW
« no previous file with comments | « cc/layers/layer_utils_unittest.cc ('k') | cc/test/layer_tree_host_common_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698