| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ | 5 #ifndef COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACES_OZONE_H_ |
| 6 #define COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ | 6 #define COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACES_OZONE_H_ |
| 7 | |
| 8 #include <memory> | |
| 9 | 7 |
| 10 #include "base/macros.h" | 8 #include "base/macros.h" |
| 11 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" | 9 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" |
| 12 | 10 |
| 13 namespace mus { | 11 namespace mus { |
| 14 | 12 |
| 15 class MojoGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager { | 13 class OzoneGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager { |
| 16 public: | 14 public: |
| 17 MojoGpuMemoryBufferManager(); | 15 OzoneGpuMemoryBufferManager(); |
| 18 ~MojoGpuMemoryBufferManager() override; | 16 ~OzoneGpuMemoryBufferManager() override; |
| 19 | 17 |
| 20 // Overridden from gpu::GpuMemoryBufferManager: | 18 // gpu::GpuMemoryBufferManager: |
| 21 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 19 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
| 22 const gfx::Size& size, | 20 const gfx::Size& size, |
| 23 gfx::BufferFormat format, | 21 gfx::BufferFormat format, |
| 24 gfx::BufferUsage usage, | 22 gfx::BufferUsage usage, |
| 25 gpu::SurfaceHandle surface_handle) override; | 23 gpu::SurfaceHandle surface_handle) override; |
| 26 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( | 24 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( |
| 27 const gfx::GpuMemoryBufferHandle& handle, | 25 const gfx::GpuMemoryBufferHandle& handle, |
| 28 const gfx::Size& size, | 26 const gfx::Size& size, |
| 29 gfx::BufferFormat format) override; | 27 gfx::BufferFormat format) override; |
| 30 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( | 28 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( |
| 31 ClientBuffer buffer) override; | 29 ClientBuffer buffer) override; |
| 32 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, | 30 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, |
| 33 const gpu::SyncToken& sync_token) override; | 31 const gpu::SyncToken& sync_token) override; |
| 34 | 32 |
| 35 private: | 33 private: |
| 36 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager); | 34 DISALLOW_COPY_AND_ASSIGN(OzoneGpuMemoryBufferManager); |
| 37 }; | 35 }; |
| 38 | 36 |
| 39 } // namespace mus | 37 } // namespace mus |
| 40 | 38 |
| 41 #endif // COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ | 39 #endif // COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACES_OZONE_H_ |
| OLD | NEW |