| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 int client_id, | 114 int client_id, |
| 115 int surface_id, | 115 int surface_id, |
| 116 int gpu_host_id, | 116 int gpu_host_id, |
| 117 bool reused_gpu_process, | 117 bool reused_gpu_process, |
| 118 const AllocationCallback& callback, | 118 const AllocationCallback& callback, |
| 119 const gfx::GpuMemoryBufferHandle& handle); | 119 const gfx::GpuMemoryBufferHandle& handle); |
| 120 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, | 120 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, |
| 121 int client_id, | 121 int client_id, |
| 122 uint32 sync_point); | 122 uint32 sync_point); |
| 123 | 123 |
| 124 uint64_t ClientIdToTracingProcessId(int client_id) const; |
| 125 |
| 124 const gfx::GpuMemoryBufferType factory_type_; | 126 const gfx::GpuMemoryBufferType factory_type_; |
| 125 const std::vector<GpuMemoryBufferFactory::Configuration> | 127 const std::vector<GpuMemoryBufferFactory::Configuration> |
| 126 supported_configurations_; | 128 supported_configurations_; |
| 127 const int gpu_client_id_; | 129 const int gpu_client_id_; |
| 128 | 130 |
| 129 // The GPU process host ID. This should only be accessed on the IO thread. | 131 // The GPU process host ID. This should only be accessed on the IO thread. |
| 130 int gpu_host_id_; | 132 int gpu_host_id_; |
| 131 | 133 |
| 132 // Stores info about buffers for all clients. This should only be accessed | 134 // Stores info about buffers for all clients. This should only be accessed |
| 133 // on the IO thread. | 135 // on the IO thread. |
| 134 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; | 136 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; |
| 135 using ClientMap = base::hash_map<int, BufferMap>; | 137 using ClientMap = base::hash_map<int, BufferMap>; |
| 136 ClientMap clients_; | 138 ClientMap clients_; |
| 137 | 139 |
| 138 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); | 140 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); |
| 139 }; | 141 }; |
| 140 | 142 |
| 141 } // namespace content | 143 } // namespace content |
| 142 | 144 |
| 143 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ | 145 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ |
| OLD | NEW |