| 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..61ced190100c38e0eb3df5fc3b12b4d1f1b6b826 100644
|
| --- a/cc/test/layer_tree_host_common_test.cc
|
| +++ b/cc/test/layer_tree_host_common_test.cc
|
| @@ -25,13 +25,13 @@ 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);
|
| }
|
|
|
| void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting(
|
| @@ -41,17 +41,55 @@ 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) {
|
| + layer->SetTransform(transform);
|
| + layer->SetTransformOrigin(transform_origin);
|
| + layer->SetPosition(position);
|
| + layer->SetBounds(bounds);
|
| + layer->SetShouldFlattenTransform(flatten_transform);
|
| + layer->Set3dSortingContextId(is_3d_sorted ? 1 : 0);
|
| +}
|
| +
|
| +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,
|
|
|