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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // Overridden from base::trace_event::MemoryDumpProvider: | 44 // Overridden from base::trace_event::MemoryDumpProvider: |
45 bool OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override; | 45 bool OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override; |
46 | 46 |
47 // Virtual for testing. | 47 // Virtual for testing. |
48 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout( | 48 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout( |
49 const gfx::Size& size, | 49 const gfx::Size& size, |
50 gfx::BufferFormat format, | 50 gfx::BufferFormat format, |
51 int32 surface_id); | 51 int32 surface_id); |
52 | 52 |
53 void AllocateGpuMemoryBufferForChildProcess( | 53 void AllocateGpuMemoryBufferForChildProcess( |
| 54 gfx::GpuMemoryBufferId id, |
54 const gfx::Size& size, | 55 const gfx::Size& size, |
55 gfx::BufferFormat format, | 56 gfx::BufferFormat format, |
56 gfx::BufferUsage usage, | 57 gfx::BufferUsage usage, |
57 base::ProcessHandle child_process_handle, | 58 base::ProcessHandle child_process_handle, |
58 int child_client_id, | 59 int child_client_id, |
59 const AllocationCallback& callback); | 60 const AllocationCallback& callback); |
60 void ChildProcessDeletedGpuMemoryBuffer( | 61 void ChildProcessDeletedGpuMemoryBuffer( |
61 gfx::GpuMemoryBufferId id, | 62 gfx::GpuMemoryBufferId id, |
62 base::ProcessHandle child_process_handle, | 63 base::ProcessHandle child_process_handle, |
63 int child_client_id, | 64 int child_client_id, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; | 138 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; |
138 using ClientMap = base::hash_map<int, BufferMap>; | 139 using ClientMap = base::hash_map<int, BufferMap>; |
139 ClientMap clients_; | 140 ClientMap clients_; |
140 | 141 |
141 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); | 142 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); |
142 }; | 143 }; |
143 | 144 |
144 } // namespace content | 145 } // namespace content |
145 | 146 |
146 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ | 147 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ |
OLD | NEW |