| Index: cc/trees/layer_tree_host_common_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
|
| index aed6857c7a5666ec089d57058569c8ef53319777..d253c886012bcaf9ecaa8d2ebf8ac3197ed158da 100644
|
| --- a/cc/trees/layer_tree_host_common_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_common_unittest.cc
|
| @@ -1317,6 +1317,30 @@ TEST_F(LayerTreeHostCommonTest, TransformAboveRootLayer) {
|
| }
|
| }
|
|
|
| +TEST_F(LayerTreeHostCommonTest, RenderSurfaceForNonAxisAlignedClipping) {
|
| + LayerImpl* root = root_layer_for_testing();
|
| + LayerImpl* rotated_and_transparent = AddChildToRoot<LayerImpl>();
|
| + LayerImpl* clips_subtree = AddChild<LayerImpl>(rotated_and_transparent);
|
| + LayerImpl* draws_content = AddChild<LayerImpl>(clips_subtree);
|
| +
|
| + root->SetBounds(gfx::Size(10, 10));
|
| + rotated_and_transparent->SetBounds(gfx::Size(10, 10));
|
| + rotated_and_transparent->test_properties()->opacity = 0.5f;
|
| + gfx::Transform rotate;
|
| + rotate.Rotate(2);
|
| + rotated_and_transparent->test_properties()->transform = rotate;
|
| + clips_subtree->SetBounds(gfx::Size(10, 10));
|
| + clips_subtree->SetMasksToBounds(true);
|
| + draws_content->SetBounds(gfx::Size(10, 10));
|
| + draws_content->SetDrawsContent(true);
|
| +
|
| + ExecuteCalculateDrawProperties(root);
|
| + EffectTree& effect_tree =
|
| + root->layer_tree_impl()->property_trees()->effect_tree;
|
| + EffectNode* node = effect_tree.Node(clips_subtree->effect_tree_index());
|
| + EXPECT_TRUE(node->has_render_surface);
|
| +}
|
| +
|
| TEST_F(LayerTreeHostCommonTest,
|
| RenderSurfaceListForRenderSurfaceWithClippedLayer) {
|
| LayerImpl* root = root_layer_for_testing();
|
|
|