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); |