OLD | NEW |
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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 const gfx::Point3F& transform_origin, | 36 const gfx::Point3F& transform_origin, |
37 const gfx::PointF& position, | 37 const gfx::PointF& position, |
38 const gfx::Size& bounds, | 38 const gfx::Size& bounds, |
39 bool flatten_transform, | 39 bool flatten_transform, |
40 bool is_3d_sorted) { | 40 bool is_3d_sorted) { |
41 layer->SetTransform(transform); | 41 layer->SetTransform(transform); |
42 layer->SetTransformOrigin(transform_origin); | 42 layer->SetTransformOrigin(transform_origin); |
43 layer->SetPosition(position); | 43 layer->SetPosition(position); |
44 layer->SetBounds(bounds); | 44 layer->SetBounds(bounds); |
45 layer->SetShouldFlattenTransform(flatten_transform); | 45 layer->SetShouldFlattenTransform(flatten_transform); |
46 layer->SetIs3dSorted(is_3d_sorted); | 46 layer->SetRenderingContextId(is_3d_sorted ? 1 : 0); |
47 } | 47 } |
48 | 48 |
49 void SetLayerPropertiesForTesting(Layer* layer, | 49 void SetLayerPropertiesForTesting(Layer* layer, |
50 const gfx::Transform& transform, | 50 const gfx::Transform& transform, |
51 const gfx::Point3F& transform_origin, | 51 const gfx::Point3F& transform_origin, |
52 const gfx::PointF& position, | 52 const gfx::PointF& position, |
53 const gfx::Size& bounds, | 53 const gfx::Size& bounds, |
54 bool flatten_transform, | 54 bool flatten_transform, |
55 bool is_3d_sorted); | 55 bool is_3d_sorted); |
56 | 56 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 int render_surface_layer_list_count_; | 123 int render_surface_layer_list_count_; |
124 }; | 124 }; |
125 | 125 |
126 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, | 126 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, |
127 public testing::Test {}; | 127 public testing::Test {}; |
128 | 128 |
129 } // namespace cc | 129 } // namespace cc |
130 | 130 |
131 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 131 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
OLD | NEW |