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 b982dc195f2d41b334873a79d50a0bd12e35fedb..9190b98e48dd5e4662adfbd0ce5b256fb45ac5f0 100644 |
--- a/cc/resources/picture_layer_tiling_unittest.cc |
+++ b/cc/resources/picture_layer_tiling_unittest.cc |
@@ -1247,102 +1247,6 @@ static void TileExists(bool exists, Tile* tile, |
EXPECT_EQ(exists, tile != NULL) << geometry_rect.ToString(); |
} |
-TEST(PictureLayerTilingTest, TilingEvictionTileIteratorStaticViewport) { |
- FakeOutputSurfaceClient output_surface_client; |
- scoped_ptr<FakeOutputSurface> output_surface = FakeOutputSurface::Create3d(); |
- CHECK(output_surface->BindToClient(&output_surface_client)); |
- TestSharedBitmapManager shared_bitmap_manager; |
- scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( |
- output_surface.get(), &shared_bitmap_manager, NULL, NULL, 0, false, 1); |
- |
- FakePictureLayerTilingClient client(resource_provider.get()); |
- scoped_ptr<TestablePictureLayerTiling> tiling; |
- |
- gfx::Rect viewport(50, 50, 100, 100); |
- gfx::Size layer_bounds(2000, 2000); |
- |
- client.SetTileSize(gfx::Size(30, 30)); |
- client.set_tree(ACTIVE_TREE); |
- |
- tiling = TestablePictureLayerTiling::Create(1.0f, layer_bounds, &client); |
- tiling->ComputeTilePriorityRects(viewport, 1.0f, 1.0, Occlusion()); |
- tiling->UpdateAllTilePrioritiesForTesting(); |
- |
- PictureLayerTiling::TilingRasterTileIterator empty_iterator; |
- EXPECT_FALSE(empty_iterator); |
- |
- std::vector<Tile*> all_tiles = tiling->AllTilesForTesting(); |
- |
- PictureLayerTiling::TilingEvictionTileIterator it( |
- tiling.get(), SMOOTHNESS_TAKES_PRIORITY, PictureLayerTiling::NOW); |
- |
- // Tiles don't have resources to evict. |
- EXPECT_FALSE(it); |
- |
- // Sanity check. |
- EXPECT_EQ(5184u, all_tiles.size()); |
- |
- client.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); |
- |
- std::set<Tile*> all_tiles_set(all_tiles.begin(), all_tiles.end()); |
- |
- std::set<Tile*> eviction_tiles; |
- |
- it = PictureLayerTiling::TilingEvictionTileIterator( |
- tiling.get(), SMOOTHNESS_TAKES_PRIORITY, PictureLayerTiling::EVENTUALLY); |
- EXPECT_TRUE(it); |
- for (; it; ++it) { |
- Tile* tile = *it; |
- EXPECT_TRUE(tile); |
- EXPECT_EQ(TilePriority::EVENTUALLY, |
- tile->priority(ACTIVE_TREE).priority_bin); |
- EXPECT_FALSE(tile->required_for_activation()); |
- eviction_tiles.insert(tile); |
- } |
- |
- it = PictureLayerTiling::TilingEvictionTileIterator( |
- tiling.get(), SMOOTHNESS_TAKES_PRIORITY, PictureLayerTiling::SOON); |
- EXPECT_TRUE(it); |
- for (; it; ++it) { |
- Tile* tile = *it; |
- EXPECT_TRUE(tile); |
- EXPECT_EQ(TilePriority::SOON, tile->priority(ACTIVE_TREE).priority_bin); |
- EXPECT_FALSE(tile->required_for_activation()); |
- eviction_tiles.insert(tile); |
- } |
- |
- it = PictureLayerTiling::TilingEvictionTileIterator( |
- tiling.get(), SMOOTHNESS_TAKES_PRIORITY, PictureLayerTiling::NOW); |
- EXPECT_TRUE(it); |
- for (; it; ++it) { |
- Tile* tile = *it; |
- EXPECT_TRUE(tile); |
- EXPECT_EQ(TilePriority::NOW, tile->priority(ACTIVE_TREE).priority_bin); |
- EXPECT_FALSE(tile->required_for_activation()); |
- eviction_tiles.insert(tile); |
- } |
- |
- it = PictureLayerTiling::TilingEvictionTileIterator( |
- tiling.get(), |
- SMOOTHNESS_TAKES_PRIORITY, |
- PictureLayerTiling::NOW_AND_REQUIRED_FOR_ACTIVATION); |
- EXPECT_FALSE(it); |
- |
- 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()); |
- |
- it = PictureLayerTiling::TilingEvictionTileIterator( |
- tiling.get(), SMOOTHNESS_TAKES_PRIORITY, |
- PictureLayerTiling::NOW_AND_REQUIRED_FOR_ACTIVATION); |
- EXPECT_TRUE(tiling->eviction_tiles_cache_valid()); |
- tiling->Reset(); |
- EXPECT_FALSE(tiling->eviction_tiles_cache_valid()); |
-} |
- |
TEST_F(PictureLayerTilingIteratorTest, TilesExist) { |
gfx::Size layer_bounds(1099, 801); |
Initialize(gfx::Size(100, 100), 1.f, layer_bounds); |