Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2545)

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2885953002: cc : Fix axis alignment tracking bug in property tree building (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698