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

Unified Diff: cc/resources/picture_layer_tiling_unittest.cc

Issue 13582006: Prioritize tiles near the viewport in out-of-viewport layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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..c57b9fc5dbf898c5dd00992a04059181f38d1421 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, ExpandRectBySizeBoundedBy) {
+ gfx::Rect in(0, 0, 100, 100);
+ gfx::Rect bounds(0, 0, 1000, 1000);
+ gfx::Rect out = PictureLayerTiling::ExpandRectBySizeBoundedBy(
+ in, 512, 512, bounds);
+ EXPECT_EQ(out.x(), 0);
+ EXPECT_EQ(out.y(), 0);
+ EXPECT_EQ(out.width(), 612);
+ EXPECT_EQ(out.height(), 612);
+}
+
} // namespace
} // namespace cc
« cc/resources/picture_layer_tiling.cc ('K') | « cc/resources/picture_layer_tiling.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698