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_MANAGER_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ |
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ | 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 GpuMemoryTrackingGroup* tracking_group, | 133 GpuMemoryTrackingGroup* tracking_group, |
134 uint64 old_size, | 134 uint64 old_size, |
135 uint64 new_size, | 135 uint64 new_size, |
136 gpu::gles2::MemoryTracker::Pool tracking_pool); | 136 gpu::gles2::MemoryTracker::Pool tracking_pool); |
137 void OnDestroyTrackingGroup(GpuMemoryTrackingGroup* tracking_group); | 137 void OnDestroyTrackingGroup(GpuMemoryTrackingGroup* tracking_group); |
138 bool EnsureGPUMemoryAvailable(uint64 size_needed); | 138 bool EnsureGPUMemoryAvailable(uint64 size_needed); |
139 | 139 |
140 // GpuMemoryManagerClientState interface | 140 // GpuMemoryManagerClientState interface |
141 void SetClientStateVisible( | 141 void SetClientStateVisible( |
142 GpuMemoryManagerClientState* client_state, bool visible); | 142 GpuMemoryManagerClientState* client_state, bool visible); |
143 void SetClientStateManagedMemoryStats( | |
144 GpuMemoryManagerClientState* client_state, | |
145 const gpu::ManagedMemoryStats& stats); | |
146 void OnDestroyClientState(GpuMemoryManagerClientState* client); | 143 void OnDestroyClientState(GpuMemoryManagerClientState* client); |
147 | 144 |
148 // Add or remove a client from its clients list (visible, nonvisible, or | 145 // Add or remove a client from its clients list (visible, nonvisible, or |
149 // nonsurface). When adding the client, add it to the front of the list. | 146 // nonsurface). When adding the client, add it to the front of the list. |
150 void AddClientToList(GpuMemoryManagerClientState* client_state); | 147 void AddClientToList(GpuMemoryManagerClientState* client_state); |
151 void RemoveClientFromList(GpuMemoryManagerClientState* client_state); | 148 void RemoveClientFromList(GpuMemoryManagerClientState* client_state); |
152 ClientStateList* GetClientList(GpuMemoryManagerClientState* client_state); | 149 ClientStateList* GetClientList(GpuMemoryManagerClientState* client_state); |
153 | 150 |
154 // Interfaces for testing | 151 // Interfaces for testing |
155 void TestingDisableScheduleManage() { disable_schedule_manage_ = true; } | 152 void TestingDisableScheduleManage() { disable_schedule_manage_ = true; } |
(...skipping 24 matching lines...) Expand all Loading... |
180 uint64 bytes_allocated_managed_current_; | 177 uint64 bytes_allocated_managed_current_; |
181 uint64 bytes_allocated_unmanaged_current_; | 178 uint64 bytes_allocated_unmanaged_current_; |
182 uint64 bytes_allocated_historical_max_; | 179 uint64 bytes_allocated_historical_max_; |
183 | 180 |
184 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); | 181 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); |
185 }; | 182 }; |
186 | 183 |
187 } // namespace content | 184 } // namespace content |
188 | 185 |
189 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ | 186 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ |
OLD | NEW |