| 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 23 matching lines...) Expand all Loading... |
| 34 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 34 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
| 35 const gfx::Size& size, | 35 const gfx::Size& size, |
| 36 gfx::GpuMemoryBuffer::Format format, | 36 gfx::GpuMemoryBuffer::Format format, |
| 37 gfx::GpuMemoryBuffer::Usage usage) override; | 37 gfx::GpuMemoryBuffer::Usage usage) override; |
| 38 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( | 38 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( |
| 39 ClientBuffer buffer) override; | 39 ClientBuffer buffer) override; |
| 40 void SetDestructionSyncPoint(gfx::GpuMemoryBuffer* buffer, | 40 void SetDestructionSyncPoint(gfx::GpuMemoryBuffer* buffer, |
| 41 uint32 sync_point) override; | 41 uint32 sync_point) override; |
| 42 | 42 |
| 43 // Overridden from base::trace_event::MemoryDumpProvider: | 43 // Overridden from base::trace_event::MemoryDumpProvider: |
| 44 bool OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override; | 44 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| 45 base::trace_event::ProcessMemoryDump* pmd) override; |
| 45 | 46 |
| 46 // Virtual for testing. | 47 // Virtual for testing. |
| 47 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout( | 48 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout( |
| 48 const gfx::Size& size, | 49 const gfx::Size& size, |
| 49 gfx::GpuMemoryBuffer::Format format, | 50 gfx::GpuMemoryBuffer::Format format, |
| 50 int32 surface_id); | 51 int32 surface_id); |
| 51 | 52 |
| 52 void AllocateGpuMemoryBufferForChildProcess( | 53 void AllocateGpuMemoryBufferForChildProcess( |
| 53 const gfx::Size& size, | 54 const gfx::Size& size, |
| 54 gfx::GpuMemoryBuffer::Format format, | 55 gfx::GpuMemoryBuffer::Format format, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; | 135 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; |
| 135 using ClientMap = base::hash_map<int, BufferMap>; | 136 using ClientMap = base::hash_map<int, BufferMap>; |
| 136 ClientMap clients_; | 137 ClientMap clients_; |
| 137 | 138 |
| 138 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); | 139 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); |
| 139 }; | 140 }; |
| 140 | 141 |
| 141 } // namespace content | 142 } // namespace content |
| 142 | 143 |
| 143 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ | 144 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ |
| OLD | NEW |