OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ |
6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ | 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 GpuProcessHost::BufferCreationStatus status); | 116 GpuProcessHost::BufferCreationStatus status); |
117 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, | 117 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, |
118 int client_id, | 118 int client_id, |
119 const gpu::SyncToken& sync_token); | 119 const gpu::SyncToken& sync_token); |
120 | 120 |
121 uint64_t ClientIdToTracingProcessId(int client_id) const; | 121 uint64_t ClientIdToTracingProcessId(int client_id) const; |
122 | 122 |
123 const gpu::GpuMemoryBufferConfigurationSet native_configurations_; | 123 const gpu::GpuMemoryBufferConfigurationSet native_configurations_; |
124 const int gpu_client_id_; | 124 const int gpu_client_id_; |
125 const uint64_t gpu_client_tracing_id_; | 125 const uint64_t gpu_client_tracing_id_; |
| 126 int next_gpu_memory_id_ = 1; |
126 | 127 |
127 // Stores info about buffers for all clients. This should only be accessed | 128 // Stores info about buffers for all clients. This should only be accessed |
128 // on the IO thread. | 129 // on the IO thread. |
129 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; | 130 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; |
130 using ClientMap = base::hash_map<int, BufferMap>; | 131 using ClientMap = base::hash_map<int, BufferMap>; |
131 ClientMap clients_; | 132 ClientMap clients_; |
132 | 133 |
133 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); | 134 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); |
134 }; | 135 }; |
135 | 136 |
136 } // namespace content | 137 } // namespace content |
137 | 138 |
138 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ | 139 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ |
OLD | NEW |