| 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..fcf31e76f30585316d1c8411eb9187509ba4b725 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),
|
| + 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_
|
|
|