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

Unified Diff: content/common/gpu/gpu_memory_manager_unittest.cc

Issue 12223064: base: Fix parsing and add dalvik-heap-limit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove Android specific path. Created 7 years, 10 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
Index: content/common/gpu/gpu_memory_manager_unittest.cc
diff --git a/content/common/gpu/gpu_memory_manager_unittest.cc b/content/common/gpu/gpu_memory_manager_unittest.cc
index b9c3727f39eaa5489359e3ab4170bfc7e351c22a..edaa56b4f980e15c11770d57d0cbe3d007df9abb 100644
--- a/content/common/gpu/gpu_memory_manager_unittest.cc
+++ b/content/common/gpu/gpu_memory_manager_unittest.cc
@@ -226,10 +226,6 @@ class GpuMemoryManagerTest : public testing::Test {
return GpuMemoryManager::CalcAvailableFromGpuTotal(bytes);
}
- uint64 CalcAvailableFromViewportArea(int viewport_area) {
- return GpuMemoryManager::CalcAvailableFromViewportArea(viewport_area);
- }
-
uint64 CalcAvailableClamped(uint64 bytes) {
bytes = std::max(bytes, memmgr_.GetDefaultAvailableGpuMemory());
bytes = std::min(bytes, memmgr_.GetMaximumTotalGpuMemory());
@@ -518,17 +514,6 @@ TEST_F(GpuMemoryManagerTest, TestUpdateAvailableGpuMemory) {
stub2(&memmgr_, GenerateUniqueSurfaceId(), false),
stub3(&memmgr_, GenerateUniqueSurfaceId(), true),
stub4(&memmgr_, GenerateUniqueSurfaceId(), false);
-
-#if defined(OS_ANDROID)
- // We use the largest visible surface size to calculate the limit
- stub1.SetSurfaceSize(gfx::Size(1024, 512)); // Surface size
- stub2.SetSurfaceSize(gfx::Size(2048, 512)); // Larger but not visible.
- stub3.SetSurfaceSize(gfx::Size(512, 512)); // Visible but smaller.
- stub4.SetSurfaceSize(gfx::Size(512, 512)); // Not visible and smaller.
- Manage();
- uint64 bytes_expected = CalcAvailableFromViewportArea(1024*512);
-#else
- // We take the lowest GPU's total memory as the limit
uint64 expected = 400 * 1024 * 1024;
stub1.SetTotalGpuMemory(expected); // GPU Memory
stub2.SetTotalGpuMemory(expected - 1024 * 1024); // Smaller but not visible.
@@ -536,7 +521,6 @@ TEST_F(GpuMemoryManagerTest, TestUpdateAvailableGpuMemory) {
stub4.SetTotalGpuMemory(expected + 1024 * 1024); // Not visible and larger.
Manage();
uint64 bytes_expected = CalcAvailableFromGpuTotal(expected);
-#endif
EXPECT_EQ(GetAvailableGpuMemory(), CalcAvailableClamped(bytes_expected));
}

Powered by Google App Engine
This is Rietveld 408576698