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_GPU_GPU_MEMORY_BUFFER_MANAGER_MUS_LOCAL_H_ |
6 #define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_GPU_MEMORY_BUFFER_MANAGER_H_ | 6 #define COMPONENTS_MUS_GPU_GPU_MEMORY_BUFFER_MANAGER_MUS_LOCAL_H_ |
7 | 7 |
8 #include <memory> | |
9 | |
10 #include "base/macros.h" | |
11 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" | 8 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" |
12 | 9 |
13 namespace blimp { | 10 namespace mus { |
14 namespace client { | |
15 | 11 |
16 class BlimpGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager { | 12 // A GpuMemoryBufferManager used locally. |
| 13 class GpuMemoryBufferManagerMusLocal : public gpu::GpuMemoryBufferManager { |
17 public: | 14 public: |
18 BlimpGpuMemoryBufferManager(); | 15 GpuMemoryBufferManagerMusLocal(int gpu_client_id, |
19 ~BlimpGpuMemoryBufferManager() override; | 16 uint64_t gpu_client_tracing_id); |
| 17 ~GpuMemoryBufferManagerMusLocal() override; |
20 | 18 |
21 // Overridden from gpu::GpuMemoryBufferManager: | 19 // Overridden from gpu::GpuMemoryBufferManager: |
22 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 20 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
23 const gfx::Size& size, | 21 const gfx::Size& size, |
24 gfx::BufferFormat format, | 22 gfx::BufferFormat format, |
25 gfx::BufferUsage usage, | 23 gfx::BufferUsage usage, |
26 gpu::SurfaceHandle surface_handle) override; | 24 gpu::SurfaceHandle surface_handle) override; |
27 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( | 25 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( |
28 const gfx::GpuMemoryBufferHandle& handle, | 26 const gfx::GpuMemoryBufferHandle& handle, |
29 const gfx::Size& size, | 27 const gfx::Size& size, |
30 gfx::BufferFormat format) override; | 28 gfx::BufferFormat format) override; |
31 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromClientId( | 29 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromClientId( |
32 int client_id, | 30 int client_id, |
33 const gfx::GpuMemoryBufferId& gpu_memory_buffer_id) override; | 31 const gfx::GpuMemoryBufferId& gpu_memory_buffer_id) override; |
34 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( | 32 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( |
35 ClientBuffer buffer) override; | 33 ClientBuffer buffer) override; |
36 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, | 34 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, |
37 const gpu::SyncToken& sync_token) override; | 35 const gpu::SyncToken& sync_token) override; |
38 | 36 |
39 private: | 37 private: |
40 DISALLOW_COPY_AND_ASSIGN(BlimpGpuMemoryBufferManager); | 38 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferManagerMusLocal); |
41 }; | 39 }; |
42 | 40 |
43 } // namespace client | 41 } // namespace mus |
44 } // namespace blimp | |
45 | 42 |
46 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_GPU_MEMORY_BUFFER_MANAGER_H_ | 43 #endif // COMPONENTS_MUS_GPU_GPU_MEMORY_BUFFER_MANAGER_MUS_LOCAL_H_ |
OLD | NEW |