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 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class GpuChannelManager; | 23 class GpuChannelManager; |
24 class GpuMemoryManagerClient; | 24 class GpuMemoryManagerClient; |
25 class GpuMemoryManagerClientState; | 25 class GpuMemoryManagerClientState; |
26 class GpuMemoryTrackingGroup; | 26 class GpuMemoryTrackingGroup; |
27 | 27 |
28 class CONTENT_EXPORT GpuMemoryManager : | 28 class CONTENT_EXPORT GpuMemoryManager : |
29 public base::SupportsWeakPtr<GpuMemoryManager> { | 29 public base::SupportsWeakPtr<GpuMemoryManager> { |
30 public: | 30 public: |
31 #if defined(OS_ANDROID) | 31 #if defined(OS_ANDROID) |
| 32 enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 1 }; |
| 33 #else |
32 enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 8 }; | 34 enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 8 }; |
33 #else | |
34 enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 1 }; | |
35 #endif | 35 #endif |
36 enum ScheduleManageTime { | 36 enum ScheduleManageTime { |
37 // Add a call to Manage to the thread's message loop immediately. | 37 // Add a call to Manage to the thread's message loop immediately. |
38 kScheduleManageNow, | 38 kScheduleManageNow, |
39 // Add a Manage call to the thread's message loop for execution 1/60th of | 39 // Add a Manage call to the thread's message loop for execution 1/60th of |
40 // of a second from now. | 40 // of a second from now. |
41 kScheduleManageLater, | 41 kScheduleManageLater, |
42 }; | 42 }; |
43 | 43 |
44 GpuMemoryManager(GpuChannelManager* channel_manager, | 44 GpuMemoryManager(GpuChannelManager* channel_manager, |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 // Used to disable automatic changes to Manage() in testing. | 289 // Used to disable automatic changes to Manage() in testing. |
290 bool disable_schedule_manage_; | 290 bool disable_schedule_manage_; |
291 | 291 |
292 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); | 292 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); |
293 }; | 293 }; |
294 | 294 |
295 } // namespace content | 295 } // namespace content |
296 | 296 |
297 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ | 297 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ |
OLD | NEW |