| Index: content/browser/gpu/browser_gpu_memory_buffer_manager.h
|
| diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.h b/content/browser/gpu/browser_gpu_memory_buffer_manager.h
|
| index b11faf870219478a21913d2c5387edfbadb1c66b..dadff8621c97b1bcf7a9fba9303d959aa164dcb0 100644
|
| --- a/content/browser/gpu/browser_gpu_memory_buffer_manager.h
|
| +++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.h
|
| @@ -52,6 +52,7 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
|
| int32 surface_id);
|
|
|
| void AllocateGpuMemoryBufferForChildProcess(
|
| + gfx::GpuMemoryBufferId id,
|
| const gfx::Size& size,
|
| gfx::BufferFormat format,
|
| gfx::BufferUsage usage,
|
| @@ -90,6 +91,8 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
|
| int gpu_host_id;
|
| };
|
| struct AllocateGpuMemoryBufferRequest;
|
| + using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>;
|
| + using ClientMap = base::hash_map<int, BufferMap>;
|
|
|
| scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForSurface(
|
| const gfx::Size& size,
|
| @@ -124,6 +127,12 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
|
|
|
| uint64_t ClientIdToTracingProcessId(int client_id) const;
|
|
|
| + // Helper that tries to add a new buffer to the map and returns false if not
|
| + // possible (because an element with the same id already existed).
|
| + bool TryAddNewBufferToMap(BufferMap& buffers,
|
| + int id,
|
| + const BufferInfo& buffer_info);
|
| +
|
| const gfx::GpuMemoryBufferType factory_type_;
|
| const std::vector<GpuMemoryBufferFactory::Configuration>
|
| supported_configurations_;
|
| @@ -135,8 +144,6 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
|
|
|
| // Stores info about buffers for all clients. This should only be accessed
|
| // on the IO thread.
|
| - using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>;
|
| - using ClientMap = base::hash_map<int, BufferMap>;
|
| ClientMap clients_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager);
|
|
|