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_CLIENT_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ |
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ | 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ |
7 | 7 |
8 #if defined(ENABLE_GPU) | 8 #if defined(ENABLE_GPU) |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // If the client has a surface, then this is an iterator in the | 77 // If the client has a surface, then this is an iterator in the |
78 // clients_visible_mru_ if this client is visible and | 78 // clients_visible_mru_ if this client is visible and |
79 // clients_nonvisible_mru_ if this is non-visible. Otherwise this is an | 79 // clients_nonvisible_mru_ if this is non-visible. Otherwise this is an |
80 // iterator in clients_nonsurface_. | 80 // iterator in clients_nonsurface_. |
81 std::list<GpuMemoryManagerClientState*>::iterator list_iterator_; | 81 std::list<GpuMemoryManagerClientState*>::iterator list_iterator_; |
82 bool list_iterator_valid_; | 82 bool list_iterator_valid_; |
83 | 83 |
84 // Statistics about memory usage. | 84 // Statistics about memory usage. |
85 GpuManagedMemoryStats managed_memory_stats_; | 85 GpuManagedMemoryStats managed_memory_stats_; |
86 | 86 |
87 // When managed_memory_stats_.bytes_nice_to_have leaves the range | 87 // When managed_memory_stats_.bytes_nicetohave leaves the range |
88 // [low_, high_], then re-adjust memory limits. | 88 // [low_, high_], then re-adjust memory limits. |
89 size_t bytes_nice_to_have_limit_low_; | 89 size_t bytes_nicetohave_limit_low_; |
90 size_t bytes_nice_to_have_limit_high_; | 90 size_t bytes_nicetohave_limit_high_; |
91 | 91 |
92 // The budget for this client. | 92 // The allocation for this client, used transiently during memory policy |
93 size_t bytes_budget_when_visible_; | 93 // calculation. |
94 size_t bytes_budget_when_backgrounded_; | 94 size_t bytes_allocation_when_visible_; |
| 95 size_t bytes_allocation_when_nonvisible_; |
95 | 96 |
96 // Set to disable allocating a frontbuffer or to disable allocations | 97 // Set to disable allocating a frontbuffer or to disable allocations |
97 // for clients that don't have surfaces. | 98 // for clients that don't have surfaces. |
98 bool hibernated_; | 99 bool hibernated_; |
99 }; | 100 }; |
100 | 101 |
101 } // namespace content | 102 } // namespace content |
102 | 103 |
103 #endif | 104 #endif |
104 | 105 |
105 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ | 106 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ |
OLD | NEW |