| 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 10 matching lines...) Expand all Loading... |
| 21 namespace content { | 21 namespace content { |
| 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) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 32 enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 1 }; | 32 enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 1 }; |
| 33 #else | 33 #else |
| 34 enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 8 }; | 34 enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 8 }; |
| 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, |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 // Used to disable automatic changes to Manage() in testing. | 257 // Used to disable automatic changes to Manage() in testing. |
| 258 bool disable_schedule_manage_; | 258 bool disable_schedule_manage_; |
| 259 | 259 |
| 260 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); | 260 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); |
| 261 }; | 261 }; |
| 262 | 262 |
| 263 } // namespace content | 263 } // namespace content |
| 264 | 264 |
| 265 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ | 265 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ |
| OLD | NEW |