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

Unified Diff: cc/resources/tile_manager_unittest.cc

Issue 251003002: cc: prevent TileManager raster/eviction tile iterators copy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/resources/tile_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager_unittest.cc
diff --git a/cc/resources/tile_manager_unittest.cc b/cc/resources/tile_manager_unittest.cc
index fac13d64a5ae02f205c882ecbc0d64e5afed8fab..1f4239b4addc397b92310af2d8641b886dac1237 100644
--- a/cc/resources/tile_manager_unittest.cc
+++ b/cc/resources/tile_manager_unittest.cc
@@ -822,13 +822,13 @@ TEST_F(TileManagerTileIteratorTest, RasterTileIterator) {
TileManager::RasterTileIterator it(tile_manager,
SAME_PRIORITY_FOR_BOTH_TREES);
EXPECT_TRUE(it);
- std::set<Tile*> all_tiles;
- size_t tile_count = 0;
+ size_t tile_count = 0;
+ std::set<Tile*> all_tiles;
for (; it; ++it) {
- ++tile_count;
EXPECT_TRUE(*it);
all_tiles.insert(*it);
+ ++tile_count;
}
EXPECT_EQ(tile_count, all_tiles.size());
@@ -986,9 +986,9 @@ TEST_F(TileManagerTileIteratorTest, EvictionTileIterator) {
tile_manager->GetPairedPictureLayers(&paired_layers);
EXPECT_EQ(1u, paired_layers.size());
- TileManager::EvictionTileIterator it(tile_manager,
- SAME_PRIORITY_FOR_BOTH_TREES);
- EXPECT_FALSE(it);
+ TileManager::EvictionTileIterator empty_it(tile_manager,
+ SAME_PRIORITY_FOR_BOTH_TREES);
+ EXPECT_FALSE(empty_it);
std::set<Tile*> all_tiles;
size_t tile_count = 0;
@@ -1007,16 +1007,12 @@ TEST_F(TileManagerTileIteratorTest, EvictionTileIterator) {
tile_manager->InitializeTilesWithResourcesForTesting(
std::vector<Tile*>(all_tiles.begin(), all_tiles.end()));
- it = TileManager::EvictionTileIterator(tile_manager,
- SAME_PRIORITY_FOR_BOTH_TREES);
+ TileManager::EvictionTileIterator it(tile_manager, SMOOTHNESS_TAKES_PRIORITY);
EXPECT_TRUE(it);
// Sanity check, all tiles should be visible.
std::set<Tile*> smoothness_tiles;
- for (TileManager::EvictionTileIterator it(tile_manager,
- SMOOTHNESS_TAKES_PRIORITY);
- it;
- ++it) {
+ for (; it; ++it) {
Tile* tile = *it;
EXPECT_TRUE(tile);
EXPECT_EQ(TilePriority::NOW, tile->priority(ACTIVE_TREE).priority_bin);
« no previous file with comments | « cc/resources/tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698