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

Unified Diff: content/common/gpu/gpu_memory_manager.h

Issue 10083056: GpuMemoryManager suggests values for renderer Contents Texture Managers' preferred memory limit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: On max 10.5, it fails to init command buffer, and my callback code didn't guard against that. Created 8 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 | « content/common/gpu/gpu_memory_allocation.h ('k') | content/common/gpu/gpu_memory_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_memory_manager.h
diff --git a/content/common/gpu/gpu_memory_manager.h b/content/common/gpu/gpu_memory_manager.h
index 51f6930c730219ad0e8011390ce3e8195990eb48..0a84ec411e0286265f3028917f0c71ad98401fbd 100644
--- a/content/common/gpu/gpu_memory_manager.h
+++ b/content/common/gpu/gpu_memory_manager.h
@@ -28,6 +28,23 @@ class CONTENT_EXPORT GpuMemoryManager {
public:
enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 8 };
+ // These are predefined values (in bytes) for
+ // GpuMemoryAllocation::gpuResourceSizeInBytes.
+ // Maximum Allocation for all tabs is a soft limit that can be exceeded
+ // during the time it takes for renderers to respect new allocations,
+ // including when switching tabs or opening a new window.
+ // To alleviate some pressure, we decrease our desired limit by "one tabs'
+ // worth" of memory.
+ enum {
+#if defined(OS_ANDROID)
+ kMinimumAllocationForTab = 32 * 1024 * 1024,
+ kMaximumAllocationForTabs = 64 * 1024 * 1024,
+#else
+ kMinimumAllocationForTab = 64 * 1024 * 1024,
+ kMaximumAllocationForTabs = 512 * 1024 * 1024 - kMinimumAllocationForTab,
+#endif
+ };
+
GpuMemoryManager(GpuMemoryManagerClient* client,
size_t max_surfaces_with_frontbuffer_soft_limit);
~GpuMemoryManager();
« no previous file with comments | « content/common/gpu/gpu_memory_allocation.h ('k') | content/common/gpu/gpu_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698