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

Unified Diff: cc/resources/picture_layer_tiling_unittest.cc

Issue 13926008: Don't shrink starting_rect in the first round. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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 70109bddd7bb04820bdd0769ad63b9e92a7fe743..90f15edc93665afd8ed183cf5aee104d3314e5c0 100644
--- a/cc/resources/picture_layer_tiling_unittest.cc
+++ b/cc/resources/picture_layer_tiling_unittest.cc
@@ -438,6 +438,15 @@ TEST(PictureLayerTilingTest, ExpandRectOutOfBoundsExpandedPartlyCover) {
EXPECT_TRUE(bounds.Contains(out));
}
+TEST(PictureLayerTilingTest, ShrinkRectContainingBounds) {
+ gfx::Rect in(0, 0, 600, 600);
+ gfx::Rect bounds(0, 0, 10, 10);
+ int64 target_area = 20 * 20;
+ gfx::Rect out = PictureLayerTiling::ExpandRectEquallyToAreaBoundedBy(
+ in, target_area, bounds);
+ EXPECT_EQ(bounds.ToString(), out.ToString());
+}
+
TEST(PictureLayerTilingTest, EmptyStartingRect) {
// If a layer has a non-invertible transform, then the starting rect
// for the layer would be empty.
« 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