| 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 #include "cc/test/layer_tree_host_common_test.h" | 5 #include "cc/test/layer_tree_host_common_test.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
| 10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 } | 24 } |
| 25 | 25 |
| 26 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( | 26 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( |
| 27 Layer* layer, | 27 Layer* layer, |
| 28 const gfx::Transform& transform, | 28 const gfx::Transform& transform, |
| 29 const gfx::Point3F& transform_origin, | 29 const gfx::Point3F& transform_origin, |
| 30 const gfx::PointF& position, | 30 const gfx::PointF& position, |
| 31 const gfx::Size& bounds, | 31 const gfx::Size& bounds, |
| 32 bool flatten_transform, | 32 bool flatten_transform, |
| 33 bool is_3d_sorted) { | 33 bool is_3d_sorted) { |
| 34 SetLayerPropertiesForTestingInternal(layer, transform, transform_origin, | 34 SetLayerPropertiesForTestingInternal(layer, transform, position, bounds, |
| 35 position, bounds, flatten_transform, | 35 flatten_transform, is_3d_sorted); |
| 36 is_3d_sorted); | 36 layer->SetTransformOrigin(transform_origin); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( | 39 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( |
| 40 LayerImpl* layer, | 40 LayerImpl* layer, |
| 41 const gfx::Transform& transform, | 41 const gfx::Transform& transform, |
| 42 const gfx::Point3F& transform_origin, | 42 const gfx::Point3F& transform_origin, |
| 43 const gfx::PointF& position, | 43 const gfx::PointF& position, |
| 44 const gfx::Size& bounds, | 44 const gfx::Size& bounds, |
| 45 bool flatten_transform, | 45 bool flatten_transform, |
| 46 bool is_3d_sorted) { | 46 bool is_3d_sorted) { |
| 47 SetLayerPropertiesForTestingInternal(layer, transform, transform_origin, | 47 SetLayerPropertiesForTestingInternal(layer, transform, position, bounds, |
| 48 position, bounds, flatten_transform, | 48 flatten_transform, is_3d_sorted); |
| 49 is_3d_sorted); | 49 layer->test_properties()->transform_origin = transform_origin; |
| 50 } | 50 } |
| 51 | 51 |
| 52 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( | 52 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( |
| 53 LayerImpl* layer, | 53 LayerImpl* layer, |
| 54 const gfx::Transform& transform, | 54 const gfx::Transform& transform, |
| 55 const gfx::Point3F& transform_origin, | 55 const gfx::Point3F& transform_origin, |
| 56 const gfx::PointF& position, | 56 const gfx::PointF& position, |
| 57 const gfx::Size& bounds, | 57 const gfx::Size& bounds, |
| 58 bool flatten_transform, | 58 bool flatten_transform, |
| 59 bool is_3d_sorted, | 59 bool is_3d_sorted, |
| 60 bool create_render_surface) { | 60 bool create_render_surface) { |
| 61 SetLayerPropertiesForTestingInternal(layer, transform, transform_origin, | 61 SetLayerPropertiesForTestingInternal(layer, transform, position, bounds, |
| 62 position, bounds, flatten_transform, | 62 flatten_transform, is_3d_sorted); |
| 63 is_3d_sorted); | 63 layer->test_properties()->transform_origin = transform_origin; |
| 64 if (create_render_surface) { | 64 if (create_render_surface) { |
| 65 layer->SetForceRenderSurface(true); | 65 layer->SetForceRenderSurface(true); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( | 69 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( |
| 70 Layer* root_layer, | 70 Layer* root_layer, |
| 71 float device_scale_factor, | 71 float device_scale_factor, |
| 72 float page_scale_factor, | 72 float page_scale_factor, |
| 73 Layer* page_scale_layer, | 73 Layer* page_scale_layer, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 LayerTreeHostCommonTest::LayerTreeHostCommonTest() | 238 LayerTreeHostCommonTest::LayerTreeHostCommonTest() |
| 239 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {} | 239 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {} |
| 240 | 240 |
| 241 LayerTreeHostCommonTest::LayerTreeHostCommonTest( | 241 LayerTreeHostCommonTest::LayerTreeHostCommonTest( |
| 242 const LayerTreeSettings& settings) | 242 const LayerTreeSettings& settings) |
| 243 : LayerTreeHostCommonTestBase(settings) { | 243 : LayerTreeHostCommonTestBase(settings) { |
| 244 } | 244 } |
| 245 | 245 |
| 246 } // namespace cc | 246 } // namespace cc |
| OLD | NEW |