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

Unified Diff: cc/resources/picture_layer_tiling_unittest.cc

Issue 669433002: cc: Invalidate eviction tiles cache when a tile is deleted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 2 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/resources/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/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 2ff5f8efb4a2aa8d9b49b4f134d932553e04f47a..c871da4cb83f30bda568181792e12a13f86dafe8 100644
--- a/cc/resources/picture_layer_tiling_unittest.cc
+++ b/cc/resources/picture_layer_tiling_unittest.cc
@@ -64,8 +64,12 @@ class TestablePictureLayerTiling : public PictureLayerTiling {
}
gfx::Rect live_tiles_rect() const { return live_tiles_rect_; }
+ bool eviction_tiles_cache_valid() const {
+ return eviction_tiles_cache_valid_;
+ }
using PictureLayerTiling::ComputeSkewport;
+ using PictureLayerTiling::RemoveTileAt;
protected:
TestablePictureLayerTiling(float contents_scale,
@@ -1344,6 +1348,10 @@ TEST(PictureLayerTilingTest, TilingEvictionTileIteratorStaticViewport) {
EXPECT_GT(all_tiles_set.size(), 0u);
EXPECT_EQ(all_tiles_set, eviction_tiles);
+
+ EXPECT_TRUE(tiling->eviction_tiles_cache_valid());
+ tiling->RemoveTileAt(0, 0, nullptr);
+ EXPECT_FALSE(tiling->eviction_tiles_cache_valid());
}
TEST_F(PictureLayerTilingIteratorTest, TilesExist) {
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698