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

Unified Diff: cc/output/output_surface_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/output/output_surface.cc ('k') | cc/raster/tile_task_worker_pool_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface_unittest.cc
diff --git a/cc/output/output_surface_unittest.cc b/cc/output/output_surface_unittest.cc
index 633733265072318641ebe9ef09ca2468c8ae8328..b09ead46493f9e3b668a26d1021ba0f255ff3b33 100644
--- a/cc/output/output_surface_unittest.cc
+++ b/cc/output/output_surface_unittest.cc
@@ -152,37 +152,6 @@ TEST(OutputSurfaceTest, ClientPointerIndicatesWorkerBindToClientFailure) {
EXPECT_FALSE(output_surface.HasClient());
}
-TEST(OutputSurfaceTest, MemoryAllocation) {
- scoped_refptr<TestContextProvider> context_provider =
- TestContextProvider::Create();
-
- TestOutputSurface output_surface(context_provider);
-
- FakeOutputSurfaceClient client;
- EXPECT_TRUE(output_surface.BindToClient(&client));
-
- ManagedMemoryPolicy policy(0);
- policy.bytes_limit_when_visible = 1234;
- policy.priority_cutoff_when_visible =
- gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY;
-
- context_provider->SetMemoryAllocation(policy);
- EXPECT_EQ(1234u, client.memory_policy().bytes_limit_when_visible);
- EXPECT_EQ(gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY,
- client.memory_policy().priority_cutoff_when_visible);
-
- policy.priority_cutoff_when_visible =
- gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING;
- context_provider->SetMemoryAllocation(policy);
- EXPECT_EQ(gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING,
- client.memory_policy().priority_cutoff_when_visible);
-
- // 0 bytes limit should be ignored.
- policy.bytes_limit_when_visible = 0;
- context_provider->SetMemoryAllocation(policy);
- EXPECT_EQ(1234u, client.memory_policy().bytes_limit_when_visible);
-}
-
TEST(OutputSurfaceTest, SoftwareOutputDeviceBackbufferManagement) {
TestSoftwareOutputDevice* software_output_device =
new TestSoftwareOutputDevice();
« no previous file with comments | « cc/output/output_surface.cc ('k') | cc/raster/tile_task_worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698