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

Unified Diff: cc/resources/tile_manager_unittest.cc

Issue 62283012: cc: Added tile bundles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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_perftest.cc ('k') | cc/test/fake_picture_layer_impl.h » ('j') | 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 8339bd07b0aa9b031137aa9606f7c7c5f46f2302..fd74c3f01eef3dbf359544554b009a4453fb2060 100644
--- a/cc/resources/tile_manager_unittest.cc
+++ b/cc/resources/tile_manager_unittest.cc
@@ -67,6 +67,7 @@ class TileManagerTest : public testing::TestWithParam<bool> {
}
virtual void TearDown() OVERRIDE {
+ bundles_.clear();
tile_manager_.reset(NULL);
picture_pile_ = NULL;
@@ -87,9 +88,14 @@ class TileManagerTest : public testing::TestWithParam<bool> {
0,
0,
Tile::USE_LCD_TEXT);
- tile->SetPriority(ACTIVE_TREE, active_priority);
- tile->SetPriority(PENDING_TREE, pending_priority);
+ scoped_refptr<TileBundle> bundle =
+ tile_manager_->CreateTileBundle(0, 0, 1, 1);
+ bundle->SetPriority(ACTIVE_TREE, active_priority);
+ bundle->SetPriority(PENDING_TREE, pending_priority);
+ bundle->AddTileAt(ACTIVE_TREE, 0, 0, tile);
+ bundle->AddTileAt(PENDING_TREE, 0, 0, tile);
tiles.push_back(tile);
+ bundles_.push_back(bundle);
}
return tiles;
}
@@ -142,6 +148,7 @@ class TileManagerTest : public testing::TestWithParam<bool> {
scoped_ptr<ResourceProvider> resource_provider_;
TileMemoryLimitPolicy memory_limit_policy_;
int max_memory_tiles_;
+ std::vector<scoped_refptr<TileBundle> > bundles_;
};
TEST_P(TileManagerTest, EnoughMemoryAllowAnything) {
@@ -528,3 +535,4 @@ INSTANTIATE_TEST_CASE_P(TileManagerTests,
} // namespace
} // namespace cc
+
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | cc/test/fake_picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698