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 24 matching lines...) Expand all Loading... |
35 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 35 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
36 const gfx::Size& size, | 36 const gfx::Size& size, |
37 gfx::BufferFormat format, | 37 gfx::BufferFormat format, |
38 gfx::BufferUsage usage) override; | 38 gfx::BufferUsage usage) override; |
39 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( | 39 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( |
40 ClientBuffer buffer) override; | 40 ClientBuffer buffer) override; |
41 void SetDestructionSyncPoint(gfx::GpuMemoryBuffer* buffer, | 41 void SetDestructionSyncPoint(gfx::GpuMemoryBuffer* buffer, |
42 uint32 sync_point) override; | 42 uint32 sync_point) override; |
43 | 43 |
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(const base::trace_event::MemoryDumpArgs& args, |
| 46 base::trace_event::ProcessMemoryDump* pmd) override; |
46 | 47 |
47 // Virtual for testing. | 48 // Virtual for testing. |
48 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout( | 49 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout( |
49 const gfx::Size& size, | 50 const gfx::Size& size, |
50 gfx::BufferFormat format, | 51 gfx::BufferFormat format, |
51 int32 surface_id); | 52 int32 surface_id); |
52 | 53 |
53 void AllocateGpuMemoryBufferForChildProcess( | 54 void AllocateGpuMemoryBufferForChildProcess( |
54 const gfx::Size& size, | 55 const gfx::Size& size, |
55 gfx::BufferFormat format, | 56 gfx::BufferFormat format, |
(...skipping 81 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 |