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

Unified Diff: cc/tiles/picture_layer_tiling_unittest.cc

Issue 1841083004: cc: Indicate that we've updated a tiling if we invalidated it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/tiles/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/tiles/picture_layer_tiling_unittest.cc
diff --git a/cc/tiles/picture_layer_tiling_unittest.cc b/cc/tiles/picture_layer_tiling_unittest.cc
index 40f288fcd364288b347a9d4a1f0a8ff646bd0a54..8129bc0eab294537a9037e8c79af3a73f8f4e110 100644
--- a/cc/tiles/picture_layer_tiling_unittest.cc
+++ b/cc/tiles/picture_layer_tiling_unittest.cc
@@ -1784,6 +1784,26 @@ TEST(PictureLayerTilingTest, RecycledTilesClearedOnReset) {
EXPECT_FALSE(recycle_tiling->TileAt(0, 0));
}
+TEST(PictureLayerTilingTest, InvalidateAfterComputeTilePriorityRects) {
enne (OOO) 2016/04/04 18:43:51 WTB a comment for the scenario that this is testin
vmpstr 2016/04/04 19:45:29 Done.
+ FakePictureLayerTilingClient pending_client;
+ pending_client.SetTileSize(gfx::Size(100, 100));
+
+ scoped_refptr<FakeRasterSource> raster_source =
+ FakeRasterSource::CreateFilled(gfx::Size(100, 100));
+ scoped_ptr<TestablePictureLayerTiling> pending_tiling =
+ TestablePictureLayerTiling::Create(PENDING_TREE, 1.0f, raster_source,
+ &pending_client, LayerTreeSettings());
+ pending_tiling->set_resolution(HIGH_RESOLUTION);
+
+ double time = 1.;
+ gfx::Rect viewport(0, 0, 100, 100);
+ EXPECT_TRUE(pending_tiling->ComputeTilePriorityRects(viewport, 1.0f, time,
+ Occlusion()));
+ pending_tiling->Invalidate(viewport);
+ EXPECT_TRUE(pending_tiling->ComputeTilePriorityRects(viewport, 1.0f, time,
+ Occlusion()));
+}
+
TEST_F(PictureLayerTilingIteratorTest, ResizeTilesAndUpdateToCurrent) {
// The tiling has four rows and three columns.
Initialize(gfx::Size(150, 100), 1.f, gfx::Size(250, 150));
« no previous file with comments | « cc/tiles/picture_layer_tiling.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698