Chromium Code Reviews| 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 acfef89ea140a8434f57249cd65bda5703e65d4a..46ae6f67171ab7597c4ff5f3aef9a19ec312135e 100644 |
| --- a/content/common/gpu/gpu_memory_allocation.h |
| +++ b/content/common/gpu/gpu_memory_allocation.h |
| @@ -97,4 +97,29 @@ struct GpuMemoryAllocation : public GpuMemoryAllocationForRenderer, |
| } |
| }; |
| +// Memory Allocation request which is sent by a client, to help GpuMemoryManager |
| +// more ideally split memory allocations across clients. |
| +struct GpuMemoryAllocationRequest { |
| + size_t min_allocation_bytes; |
| + size_t ideal_allocation_bytes; |
| + |
| + GpuMemoryAllocationRequest() |
| + : min_allocation_bytes(0), |
| + ideal_allocation_bytes(0) { |
| + } |
| + |
| + GpuMemoryAllocationRequest(size_t min_bytes, size_t ideal_bytes) |
| + : min_allocation_bytes(min_bytes), |
|
piman
2012/07/18 19:59:58
nit: extra 2 spaces indent.
|
| + ideal_allocation_bytes(ideal_bytes) { |
| + } |
| + |
| + bool operator==(const GpuMemoryAllocationRequest& other) const { |
| + return min_allocation_bytes == other.min_allocation_bytes && |
| + ideal_allocation_bytes == other.ideal_allocation_bytes; |
| + } |
| + bool operator!=(const GpuMemoryAllocationRequest& other) const { |
| + return !(*this == other); |
| + } |
| +}; |
| + |
| #endif // CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ |