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 #pragma once | |
8 | 7 |
9 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
10 | 9 |
11 // These are per context memory allocation limits set by the GpuMemoryManager | 10 // These are per context memory allocation limits set by the GpuMemoryManager |
12 // and assigned to the browser and renderer context. | 11 // and assigned to the browser and renderer context. |
13 // They will change over time, given memory availability, and browser state. | 12 // They will change over time, given memory availability, and browser state. |
14 | 13 |
15 // Memory Allocation which will be assigned to the renderer context. | 14 // Memory Allocation which will be assigned to the renderer context. |
16 struct GpuMemoryAllocationForRenderer { | 15 struct GpuMemoryAllocationForRenderer { |
17 enum { | 16 enum { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 static_cast<const GpuMemoryAllocationForRenderer&>(other) && | 91 static_cast<const GpuMemoryAllocationForRenderer&>(other) && |
93 static_cast<const GpuMemoryAllocationForBrowser&>(*this) == | 92 static_cast<const GpuMemoryAllocationForBrowser&>(*this) == |
94 static_cast<const GpuMemoryAllocationForBrowser&>(other); | 93 static_cast<const GpuMemoryAllocationForBrowser&>(other); |
95 } | 94 } |
96 bool operator!=(const GpuMemoryAllocation& other) const { | 95 bool operator!=(const GpuMemoryAllocation& other) const { |
97 return !(*this == other); | 96 return !(*this == other); |
98 } | 97 } |
99 }; | 98 }; |
100 | 99 |
101 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ | 100 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ |
OLD | NEW |