Chromium Code Reviews| Index: cc/test/layer_tree_host_common_test.cc |
| diff --git a/cc/test/layer_tree_host_common_test.cc b/cc/test/layer_tree_host_common_test.cc |
| index 3b6b14b5dec2efcd5ea3ebd6e6259d598de4830c..71be7818cb8669e06ddeeda240e0717be12f0a58 100644 |
| --- a/cc/test/layer_tree_host_common_test.cc |
| +++ b/cc/test/layer_tree_host_common_test.cc |
| @@ -25,13 +25,14 @@ void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( |
| const gfx::Size& bounds, |
| bool flatten_transform, |
| bool is_3d_sorted) { |
| - SetLayerPropertiesForTestingInternal<Layer>(layer, |
| - transform, |
| - transform_origin, |
| - position, |
| - bounds, |
| - flatten_transform, |
| - is_3d_sorted); |
| + SetLayerPropertiesForTestingInternal(layer, |
| + transform, |
| + transform_origin, |
| + position, |
| + bounds, |
| + flatten_transform, |
| + is_3d_sorted, |
| + false); |
| } |
| void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( |
| @@ -41,17 +42,59 @@ void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( |
| const gfx::PointF& position, |
| const gfx::Size& bounds, |
| bool flatten_transform, |
| - bool is_3d_sorted) { |
| - SetLayerPropertiesForTestingInternal<LayerImpl>(layer, |
| - transform, |
| - transform_origin, |
| - position, |
| - bounds, |
| - flatten_transform, |
| - is_3d_sorted); |
| + bool is_3d_sorted, |
| + bool create_render_surface) { |
| + SetLayerPropertiesForTestingInternal(layer, |
| + transform, |
| + transform_origin, |
| + position, |
| + bounds, |
| + flatten_transform, |
| + is_3d_sorted, |
| + create_render_surface); |
| layer->SetContentBounds(bounds); |
| } |
| +void LayerTreeHostCommonTestBase::SetLayerPropertiesForTestingInternal( |
| + Layer* layer, |
| + const gfx::Transform& transform, |
| + const gfx::Point3F& transform_origin, |
| + const gfx::PointF& position, |
| + const gfx::Size& bounds, |
| + bool flatten_transform, |
| + bool is_3d_sorted, |
| + bool create_render_surface) { |
|
danakj
2014/09/03 19:30:33
this is always false, so just remove it?
awoloszyn
2014/09/09 15:31:36
Done.
|
| + layer->SetTransform(transform); |
| + layer->SetTransformOrigin(transform_origin); |
| + layer->SetPosition(position); |
| + layer->SetBounds(bounds); |
| + layer->SetShouldFlattenTransform(flatten_transform); |
| + layer->Set3dSortingContextId(is_3d_sorted ? 1 : 0); |
| + if (create_render_surface) { |
| + layer->CreateRenderSurface(); |
| + } |
| +} |
| + |
| +void LayerTreeHostCommonTestBase::SetLayerPropertiesForTestingInternal( |
| + LayerImpl* layer, |
| + const gfx::Transform& transform, |
| + const gfx::Point3F& transform_origin, |
| + const gfx::PointF& position, |
| + const gfx::Size& bounds, |
| + bool flatten_transform, |
| + bool is_3d_sorted, |
| + bool create_render_surface) { |
| + layer->SetTransform(transform); |
| + layer->SetTransformOrigin(transform_origin); |
| + layer->SetPosition(position); |
| + layer->SetBounds(bounds); |
| + layer->SetShouldFlattenTransform(flatten_transform); |
| + layer->Set3dSortingContextId(is_3d_sorted ? 1 : 0); |
| + if (create_render_surface) { |
| + layer->SetHasRenderSurface(true); |
| + } |
| +} |
| + |
| void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( |
| Layer* root_layer, |
| float device_scale_factor, |