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

Unified Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 577753002: cc: Don't clip tile priority visible rect to content bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +comment Created 6 years, 3 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/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl_unittest.cc
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 2b9457b019fe60f6862711d97893cd87f7bda4c0..4f18d23c8b4da46e0cdcf0213eb586b31ebd32f7 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -397,6 +397,10 @@ TEST_F(PictureLayerImplTest, ExternalViewportRectForPrioritizingTiles) {
bool success = transform_for_tile_priority.GetInverse(&screen_to_view);
EXPECT_TRUE(success);
+ // Note that we don't clip this to the layer bounds, since it is expected that
+ // the rect will sometimes be outside of the layer bounds. If we clip to
+ // bounds, then tile priorities will end up being incorrect in cases of fully
+ // offscreen layer.
viewport_rect_for_tile_priority_in_view_space =
gfx::ToEnclosingRect(MathUtil::ProjectClippedRect(
screen_to_view, viewport_rect_for_tile_priority));
@@ -405,10 +409,6 @@ TEST_F(PictureLayerImplTest, ExternalViewportRectForPrioritizingTiles) {
EXPECT_EQ(active_layer_->viewport_rect_for_tile_priority(),
viewport_rect_for_tile_priority_in_view_space);
- // Interset viewport_rect_for_tile_priority_in_view_space with the layer
- // bounds and the result should be used in PictureLayerTiling.
- viewport_rect_for_tile_priority_in_view_space.Intersect(
- gfx::Rect(layer_bounds));
tilings = active_layer_->tilings();
for (size_t i = 0; i < tilings->num_tilings(); i++) {
PictureLayerTiling* tiling = tilings->tiling_at(i);
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698