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