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

Unified Diff: cc/resources/picture_layer_tiling_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/resources/picture_layer_tiling.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling_unittest.cc
diff --git a/cc/resources/picture_layer_tiling_unittest.cc b/cc/resources/picture_layer_tiling_unittest.cc
index 91043e67b48006e13d72f42781c97fd55828fcdb..544cac8ad2a6eb9120757af19185c19ba361cd45 100644
--- a/cc/resources/picture_layer_tiling_unittest.cc
+++ b/cc/resources/picture_layer_tiling_unittest.cc
@@ -358,5 +358,16 @@ TEST(PictureLayerTilingTest, ExpandRectOutOfBounds) {
EXPECT_TRUE(out.IsEmpty());
}
+TEST(PictureLayerTilingTest, EmptyStartingRect) {
enne (OOO) 2013/04/09 02:08:38 WTB unit test that makes sure this layer also has
danakj 2013/04/09 02:42:17 OK will do!
+ // If a layer has a non-invertible transform, then the starting rect
+ // for the layer would be empty.
+ gfx::Rect in(40, 40, 0, 0);
+ gfx::Rect bounds(0, 0, 10, 10);
+ int64 target_area = 400 * 400;
+ gfx::Rect out = PictureLayerTiling::ExpandRectEquallyToAreaBoundedBy(
+ in, target_area, bounds);
+ EXPECT_TRUE(out.IsEmpty());
+}
+
} // namespace
} // namespace cc
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698