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..b91f2e807786ee1ae2c83c15965b897fd5c1ae89 100644 |
| --- a/content/common/gpu/gpu_memory_allocation.h |
| +++ b/content/common/gpu/gpu_memory_allocation.h |
| @@ -97,4 +97,30 @@ 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 |
| +{ |
|
piman
2012/07/18 17:11:25
nit: { on previous line
|
| + size_t min_allocation_bytes; |
| + size_t ideal_allocation_bytes; |
| + |
| + GpuMemoryAllocationRequest() |
| + : min_allocation_bytes(0), ideal_allocation_bytes(0) |
|
piman
2012/07/18 17:11:25
nit: indent (+4 before :), style (ideal_allocation
|
| + { |
| + } |
| + |
| + GpuMemoryAllocationRequest(size_t min_bytes, size_t ideal_bytes) |
| + : min_allocation_bytes(min_bytes), ideal_allocation_bytes(ideal_bytes) |
| + { |
| + } |
| + |
| + bool operator==(const GpuMemoryAllocationRequest& other) const { |
| + return min_allocation_bytes == other.min_allocation_bytes && |
|
piman
2012/07/18 17:11:25
nit: indent (+2)
|
| + ideal_allocation_bytes == other.ideal_allocation_bytes; |
|
piman
2012/07/18 17:11:25
nit: indent (+4 for continuations)
|
| + } |
| + bool operator!=(const GpuMemoryAllocationRequest& other) const { |
| + return !(*this == other); |
| + } |
| +}; |
| + |
| #endif // CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ |