OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ |
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ | 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
| 10 namespace content { |
| 11 |
10 // These are per context memory allocation limits set by the GpuMemoryManager | 12 // These are per context memory allocation limits set by the GpuMemoryManager |
11 // and assigned to the browser and renderer context. | 13 // and assigned to the browser and renderer context. |
12 // They will change over time, given memory availability, and browser state. | 14 // They will change over time, given memory availability, and browser state. |
13 | 15 |
14 // Memory Allocation which will be assigned to the renderer context. | 16 // Memory Allocation which will be assigned to the renderer context. |
15 struct GpuMemoryAllocationForRenderer { | 17 struct GpuMemoryAllocationForRenderer { |
16 enum { | 18 enum { |
17 INVALID_RESOURCE_SIZE = -1 | 19 INVALID_RESOURCE_SIZE = -1 |
18 }; | 20 }; |
19 | 21 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 117 |
116 bool operator==(const GpuMemoryAllocationRequest& other) const { | 118 bool operator==(const GpuMemoryAllocationRequest& other) const { |
117 return min_allocation_bytes == other.min_allocation_bytes && | 119 return min_allocation_bytes == other.min_allocation_bytes && |
118 ideal_allocation_bytes == other.ideal_allocation_bytes; | 120 ideal_allocation_bytes == other.ideal_allocation_bytes; |
119 } | 121 } |
120 bool operator!=(const GpuMemoryAllocationRequest& other) const { | 122 bool operator!=(const GpuMemoryAllocationRequest& other) const { |
121 return !(*this == other); | 123 return !(*this == other); |
122 } | 124 } |
123 }; | 125 }; |
124 | 126 |
| 127 } // namespace content |
| 128 |
125 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ | 129 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ |
OLD | NEW |