OLD | NEW |
1 // Copyright 2016 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 BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_GPU_MEMORY_BUFFER_MANAGER_H_ | 5 #ifndef COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACES_OZONE_H_ |
6 #define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_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 blimp { | 11 namespace ui { |
14 namespace client { | |
15 | 12 |
16 class BlimpGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager { | 13 class OzoneGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager { |
17 public: | 14 public: |
18 BlimpGpuMemoryBufferManager(); | 15 OzoneGpuMemoryBufferManager(); |
19 ~BlimpGpuMemoryBufferManager() override; | 16 ~OzoneGpuMemoryBufferManager() override; |
20 | 17 |
21 // Overridden from gpu::GpuMemoryBufferManager: | 18 // gpu::GpuMemoryBufferManager: |
22 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 19 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
23 const gfx::Size& size, | 20 const gfx::Size& size, |
24 gfx::BufferFormat format, | 21 gfx::BufferFormat format, |
25 gfx::BufferUsage usage, | 22 gfx::BufferUsage usage, |
26 gpu::SurfaceHandle surface_handle) override; | 23 gpu::SurfaceHandle surface_handle) override; |
27 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( | 24 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( |
28 const gfx::GpuMemoryBufferHandle& handle, | 25 const gfx::GpuMemoryBufferHandle& handle, |
29 const gfx::Size& size, | 26 const gfx::Size& size, |
30 gfx::BufferFormat format) override; | 27 gfx::BufferFormat format) override; |
31 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( | 28 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( |
32 ClientBuffer buffer) override; | 29 ClientBuffer buffer) override; |
33 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, | 30 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, |
34 const gpu::SyncToken& sync_token) override; | 31 const gpu::SyncToken& sync_token) override; |
35 | 32 |
36 private: | 33 private: |
37 DISALLOW_COPY_AND_ASSIGN(BlimpGpuMemoryBufferManager); | 34 DISALLOW_COPY_AND_ASSIGN(OzoneGpuMemoryBufferManager); |
38 }; | 35 }; |
39 | 36 |
40 } // namespace client | 37 } // namespace ui |
41 } // namespace blimp | |
42 | 38 |
43 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_GPU_MEMORY_BUFFER_MANAGER_H_ | 39 #endif // COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACES_OZONE_H_ |
OLD | NEW |