diff options
author | mmocny@chromium.org <mmocny@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-28 02:23:46 +0000 |
---|---|---|
committer | mmocny@chromium.org <mmocny@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-28 02:23:46 +0000 |
commit | 30108bd82c0a19c000703d414139f6d7491df772 (patch) | |
tree | 6d92bd034c7cb268b814740fd3a7693fd425a2eb /content/common/gpu/gpu_memory_manager.h | |
parent | a7ea888567826cdd7011b6aceafd5eb90724b49d (diff) | |
download | chromium_src-30108bd82c0a19c000703d414139f6d7491df772.zip chromium_src-30108bd82c0a19c000703d414139f6d7491df772.tar.gz chromium_src-30108bd82c0a19c000703d414139f6d7491df772.tar.bz2 |
GpuMemoryManager suggests values for renderer Contents Texture Managers' preferred memory limit.
BUG=123382
TEST=Manual
Review URL: http://codereview.chromium.org/10083056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134428 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/gpu_memory_manager.h')
-rw-r--r-- | content/common/gpu/gpu_memory_manager.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/content/common/gpu/gpu_memory_manager.h b/content/common/gpu/gpu_memory_manager.h index 51f6930..0a84ec4 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(); |