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

Unified Diff: cc/tiles/tile_manager_unittest.cc

Issue 1324413003: Move gpu memory calculations to Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment + android_arm64_dbg_recipe bot issue. Created 5 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/test/test_in_process_context_provider.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager_unittest.cc
diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc
index e68ea1ff7794b2e8780721d3e2793db846c475af..0a0cb60684f127354bdc036b759bebb8071bc372 100644
--- a/cc/tiles/tile_manager_unittest.cc
+++ b/cc/tiles/tile_manager_unittest.cc
@@ -1363,6 +1363,22 @@ TEST_F(TileManagerTilePriorityQueueTest,
host_impl_.resource_pool()->ReleaseResource(resource, 0);
}
+TEST_F(TileManagerTilePriorityQueueTest, DefaultMemoryPolicy) {
+ const gfx::Size layer_bounds(1000, 1000);
+ host_impl_.SetViewportSize(layer_bounds);
+ SetupDefaultTrees(layer_bounds);
+
+ host_impl_.tile_manager()->PrepareTiles(host_impl_.global_tile_state());
+
+ // 64MB is the default mem limit.
+ EXPECT_EQ(67108864u,
+ host_impl_.global_tile_state().hard_memory_limit_in_bytes);
+ EXPECT_EQ(TileMemoryLimitPolicy::ALLOW_ANYTHING,
+ host_impl_.global_tile_state().memory_limit_policy);
+ EXPECT_EQ(ManagedMemoryPolicy::kDefaultNumResourcesLimit,
+ host_impl_.global_tile_state().num_resources_limit);
+}
+
TEST_F(TileManagerTilePriorityQueueTest, RasterQueueAllUsesCorrectTileBounds) {
// Verify that we use the real tile bounds when advancing phases during the
// tile iteration.
« no previous file with comments | « cc/test/test_in_process_context_provider.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698