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 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // to get the exact amount of GPU memory. | 41 // to get the exact amount of GPU memory. |
42 virtual bool GetTotalGpuMemory(uint64* bytes) = 0; | 42 virtual bool GetTotalGpuMemory(uint64* bytes) = 0; |
43 }; | 43 }; |
44 | 44 |
45 // The state associated with a GPU memory manager client. This acts as the | 45 // The state associated with a GPU memory manager client. This acts as the |
46 // handle through which the client interacts with the GPU memory manager. | 46 // handle through which the client interacts with the GPU memory manager. |
47 class CONTENT_EXPORT GpuMemoryManagerClientState { | 47 class CONTENT_EXPORT GpuMemoryManagerClientState { |
48 public: | 48 public: |
49 ~GpuMemoryManagerClientState(); | 49 ~GpuMemoryManagerClientState(); |
50 void SetVisible(bool visible); | 50 void SetVisible(bool visible); |
51 void SetManagedMemoryStats(const gpu::ManagedMemoryStats& stats); | |
52 | 51 |
53 private: | 52 private: |
54 friend class GpuMemoryManager; | 53 friend class GpuMemoryManager; |
55 | 54 |
56 GpuMemoryManagerClientState(GpuMemoryManager* memory_manager, | 55 GpuMemoryManagerClientState(GpuMemoryManager* memory_manager, |
57 GpuMemoryManagerClient* client, | 56 GpuMemoryManagerClient* client, |
58 GpuMemoryTrackingGroup* tracking_group, | 57 GpuMemoryTrackingGroup* tracking_group, |
59 bool has_surface, | 58 bool has_surface, |
60 bool visible); | 59 bool visible); |
61 | 60 |
(...skipping 20 matching lines...) Expand all Loading... |
82 bool list_iterator_valid_; | 81 bool list_iterator_valid_; |
83 | 82 |
84 // Set to disable allocating a frontbuffer or to disable allocations | 83 // Set to disable allocating a frontbuffer or to disable allocations |
85 // for clients that don't have surfaces. | 84 // for clients that don't have surfaces. |
86 bool hibernated_; | 85 bool hibernated_; |
87 }; | 86 }; |
88 | 87 |
89 } // namespace content | 88 } // namespace content |
90 | 89 |
91 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ | 90 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ |
OLD | NEW |