| 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 "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/trace_event/memory_dump_provider.h" | 10 #include "base/trace_event/memory_dump_provider.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 gfx::GpuMemoryBuffer::Format format, | 82 gfx::GpuMemoryBuffer::Format format, |
| 83 gfx::GpuMemoryBuffer::Usage usage, | 83 gfx::GpuMemoryBuffer::Usage usage, |
| 84 int32 surface_id); | 84 int32 surface_id); |
| 85 void AllocateGpuMemoryBufferOnIO(AllocateGpuMemoryBufferRequest* request); | 85 void AllocateGpuMemoryBufferOnIO(AllocateGpuMemoryBufferRequest* request); |
| 86 void GpuMemoryBufferAllocatedOnIO(AllocateGpuMemoryBufferRequest* request, | 86 void GpuMemoryBufferAllocatedOnIO(AllocateGpuMemoryBufferRequest* request, |
| 87 const gfx::GpuMemoryBufferHandle& handle); | 87 const gfx::GpuMemoryBufferHandle& handle); |
| 88 void GpuMemoryBufferDeleted(gfx::GpuMemoryBufferId id, | 88 void GpuMemoryBufferDeleted(gfx::GpuMemoryBufferId id, |
| 89 int client_id, | 89 int client_id, |
| 90 uint32 sync_point); | 90 uint32 sync_point); |
| 91 void GpuMemoryBufferAllocatedForChildProcess( | 91 void GpuMemoryBufferAllocatedForChildProcess( |
| 92 gfx::GpuMemoryBufferId id, |
| 92 int child_client_id, | 93 int child_client_id, |
| 93 const AllocationCallback& callback, | 94 const AllocationCallback& callback, |
| 94 const gfx::GpuMemoryBufferHandle& handle); | 95 const gfx::GpuMemoryBufferHandle& handle); |
| 95 | 96 |
| 96 GpuMemoryBufferFactoryHost* gpu_memory_buffer_factory_host_; | 97 GpuMemoryBufferFactoryHost* gpu_memory_buffer_factory_host_; |
| 97 int gpu_client_id_; | 98 int gpu_client_id_; |
| 98 | 99 |
| 99 typedef base::hash_map<gfx::GpuMemoryBufferId, BufferInfo> BufferMap; | 100 typedef base::hash_map<gfx::GpuMemoryBufferId, BufferInfo> BufferMap; |
| 100 typedef base::hash_map<int, BufferMap> ClientMap; | 101 typedef base::hash_map<int, BufferMap> ClientMap; |
| 101 ClientMap clients_; | 102 ClientMap clients_; |
| 102 | 103 |
| 103 base::WeakPtrFactory<BrowserGpuMemoryBufferManager> weak_ptr_factory_; | 104 base::WeakPtrFactory<BrowserGpuMemoryBufferManager> weak_ptr_factory_; |
| 104 | 105 |
| 105 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); | 106 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 } // namespace content | 109 } // namespace content |
| 109 | 110 |
| 110 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ | 111 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ |
| OLD | NEW |