| Index: content/common/gpu/gpu_memory_allocation.h
|
| diff --git a/content/common/gpu/gpu_memory_allocation.h b/content/common/gpu/gpu_memory_allocation.h
|
| index b38fe8320403a9bd8327dc659963479e7914867a..3df1c66a7757daf6b1bcc075d032e6e778c03e2c 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,6 +67,13 @@ struct GpuMemoryAllocationForBrowser {
|
| // GpuMemoryManager.
|
| struct GpuMemoryAllocation : public GpuMemoryAllocationForRenderer,
|
| public GpuMemoryAllocationForBrowser {
|
| + // Bitmap
|
| + enum BufferAllocation {
|
| + kHasNoBuffers = 0,
|
| + kHasFrontbuffer = 1,
|
| + kHasBackbuffer = 2
|
| + };
|
| +
|
| GpuMemoryAllocation()
|
| : GpuMemoryAllocationForRenderer(),
|
| GpuMemoryAllocationForBrowser() {
|
| @@ -81,6 +87,13 @@ struct GpuMemoryAllocation : public GpuMemoryAllocationForRenderer,
|
| GpuMemoryAllocationForBrowser(suggest_have_frontbuffer) {
|
| }
|
|
|
| + GpuMemoryAllocation(size_t gpu_resource_size_in_bytes,
|
| + int allocationBitmap)
|
| + : GpuMemoryAllocationForRenderer(gpu_resource_size_in_bytes,
|
| + allocationBitmap & kHasBackbuffer),
|
| + GpuMemoryAllocationForBrowser(allocationBitmap & kHasFrontbuffer) {
|
| + }
|
| +
|
| bool operator==(const GpuMemoryAllocation& other) const {
|
| return static_cast<const GpuMemoryAllocationForRenderer&>(*this) ==
|
| static_cast<const GpuMemoryAllocationForRenderer&>(other) &&
|
|
|