Chromium Code Reviews| Index: cc/resources/picture_pile_unittest.cc |
| diff --git a/cc/resources/picture_pile_unittest.cc b/cc/resources/picture_pile_unittest.cc |
| index d6d75fad1cd4215a5d91d355452c0a0083e5be73..b49f683bd1bb26557fbd8e38277611ce5078af68 100644 |
| --- a/cc/resources/picture_pile_unittest.cc |
| +++ b/cc/resources/picture_pile_unittest.cc |
| @@ -1432,5 +1432,26 @@ TEST_F(PicturePileTest, SolidRectangleIsSolid) { |
| EXPECT_FALSE(pile_.is_solid_color()); |
| } |
| +TEST_F(PicturePileTest, NonSolidRectangleOnOffsetedLayerIsNonSolid) { |
|
vmpstr
2014/10/29 21:41:58
Offset?
|
| + gfx::Rect tiling_rect(tiling_rect()); |
| + tiling_rect.Offset(gfx::Vector2d(10000, 0)); |
| + gfx::Size tiling_size(tiling_rect.x() + tiling_rect.width(), |
|
vmpstr
2014/10/29 21:41:59
right, bottom? Also, why is the tiling size bigger
|
| + tiling_rect.y() + tiling_rect.height()); |
| + // |Setup()| will create pictures here that mess with the test, clear it! |
| + pile_.Clear(); |
| + |
| + SkPaint paint; |
| + paint.setColor(SK_ColorCYAN); |
| + |
| + // Add a rect that doesn't cover the viewport completely, the solid state |
| + // will be false. |
| + gfx::Rect smallRect = tiling_rect; |
| + smallRect.Inset(10, 10, 10, 10); |
| + client_.add_draw_rect(smallRect, paint); |
| + Region invalidation2(tiling_rect); |
|
vmpstr
2014/10/29 21:41:59
just invalidation.
|
| + UpdateAndExpandInvalidation(&invalidation2, tiling_size, tiling_rect); |
| + EXPECT_FALSE(pile_.is_solid_color()); |
| +} |
| + |
| } // namespace |
| } // namespace cc |