summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/gpu_memory_allocation.h
diff options
context:
space:
mode:
authormmocny@chromium.org <mmocny@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-28 02:23:46 +0000
committermmocny@chromium.org <mmocny@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-28 02:23:46 +0000
commit30108bd82c0a19c000703d414139f6d7491df772 (patch)
tree6d92bd034c7cb268b814740fd3a7693fd425a2eb /content/common/gpu/gpu_memory_allocation.h
parenta7ea888567826cdd7011b6aceafd5eb90724b49d (diff)
downloadchromium_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_allocation.h')
-rw-r--r--content/common/gpu/gpu_memory_allocation.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/content/common/gpu/gpu_memory_allocation.h b/content/common/gpu/gpu_memory_allocation.h
index b38fe832..3e11979 100644
--- a/content/common/gpu/gpu_memory_allocation.h
+++ b/content/common/gpu/gpu_memory_allocation.h
@@ -12,7 +12,6 @@
// and assigned to the browser and renderer context.
// They will change over time, given memory availability, and browser state.
-
// Memory Allocation which will be assigned to the renderer context.
struct GpuMemoryAllocationForRenderer {
enum {
@@ -68,17 +67,24 @@ struct GpuMemoryAllocationForBrowser {
// GpuMemoryManager.
struct GpuMemoryAllocation : public GpuMemoryAllocationForRenderer,
public GpuMemoryAllocationForBrowser {
+ // Bitmap
+ enum BufferAllocation {
+ kHasNoBuffers = 0,
+ kHasFrontbuffer = 1,
+ kHasBackbuffer = 2
+ };
+
GpuMemoryAllocation()
: GpuMemoryAllocationForRenderer(),
GpuMemoryAllocationForBrowser() {
}
GpuMemoryAllocation(size_t gpu_resource_size_in_bytes,
- bool suggest_have_backbuffer,
- bool suggest_have_frontbuffer)
+ int allocationBitmap)
: GpuMemoryAllocationForRenderer(gpu_resource_size_in_bytes,
- suggest_have_backbuffer),
- GpuMemoryAllocationForBrowser(suggest_have_frontbuffer) {
+ (allocationBitmap & kHasBackbuffer) == kHasBackbuffer),
+ GpuMemoryAllocationForBrowser(
+ (allocationBitmap & kHasFrontbuffer) == kHasFrontbuffer) {
}
bool operator==(const GpuMemoryAllocation& other) const {