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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 13820002: cc: Don't DCHECK for layers with non-invertible transforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_unittest.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 595e08c70237a90ae1e9a942455c80f011c8479a..d161a58d2f104cfefbdcdaf5e3b4af645675f0fc 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -3719,6 +3719,37 @@ TEST(LayerTreeHostCommonTest,
}
TEST(LayerTreeHostCommonTest,
+ DrawableAndVisibleContentRectsForLayersWithUninvertibleTransform) {
+ scoped_refptr<Layer> root = Layer::Create();
+ scoped_refptr<LayerWithForcedDrawsContent> child =
+ make_scoped_refptr(new LayerWithForcedDrawsContent());
+ root->AddChild(child);
+
+ gfx::Transform identity_matrix;
+ gfx::Transform uninvertible_matrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+
+ SetLayerPropertiesForTesting(root.get(),
+ identity_matrix,
+ identity_matrix,
+ gfx::PointF(),
+ gfx::PointF(),
+ gfx::Size(100, 100),
+ false);
+ SetLayerPropertiesForTesting(child.get(),
+ uninvertible_matrix,
+ identity_matrix,
+ gfx::PointF(),
+ gfx::PointF(5.f, 5.f),
+ gfx::Size(50, 50),
+ false);
+
+ ExecuteCalculateDrawProperties(root.get());
+
+ EXPECT_TRUE(child->visible_content_rect().IsEmpty());
+ EXPECT_TRUE(child->drawable_content_rect().IsEmpty());
+}
+
+TEST(LayerTreeHostCommonTest,
DrawableAndVisibleContentRectsForLayersInClippedRenderSurface) {
scoped_refptr<Layer> root = Layer::Create();
scoped_refptr<Layer> render_surface1 = Layer::Create();
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698