Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: components/mus/common/mojo_gpu_memory_buffer_manager.h

Issue 2020293003: Use mus::MojoGpuMemoryBufferManager in mus::GpuService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_COMMON_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define COMPONENTS_MUS_COMMON_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/mus/common/mus_common_export.h"
11 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" 12 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
12 13
13 namespace mus { 14 namespace mus {
14 15
15 class MojoGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager { 16 class MUS_COMMON_EXPORT MojoGpuMemoryBufferManager
17 : public gpu::GpuMemoryBufferManager {
16 public: 18 public:
17 MojoGpuMemoryBufferManager(); 19 MojoGpuMemoryBufferManager();
18 ~MojoGpuMemoryBufferManager() override; 20 ~MojoGpuMemoryBufferManager() override;
19 21
20 // Overridden from gpu::GpuMemoryBufferManager: 22 // Overridden from gpu::GpuMemoryBufferManager:
21 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 23 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
22 const gfx::Size& size, 24 const gfx::Size& size,
23 gfx::BufferFormat format, 25 gfx::BufferFormat format,
24 gfx::BufferUsage usage, 26 gfx::BufferUsage usage,
25 gpu::SurfaceHandle surface_handle) override; 27 gpu::SurfaceHandle surface_handle) override;
26 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( 28 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
27 const gfx::GpuMemoryBufferHandle& handle, 29 const gfx::GpuMemoryBufferHandle& handle,
28 const gfx::Size& size, 30 const gfx::Size& size,
29 gfx::BufferFormat format) override; 31 gfx::BufferFormat format) override;
30 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromClientId( 32 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromClientId(
31 int client_id, 33 int client_id,
32 const gfx::GpuMemoryBufferId& gpu_memory_buffer_id) override; 34 const gfx::GpuMemoryBufferId& gpu_memory_buffer_id) override;
33 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( 35 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
34 ClientBuffer buffer) override; 36 ClientBuffer buffer) override;
35 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, 37 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
36 const gpu::SyncToken& sync_token) override; 38 const gpu::SyncToken& sync_token) override;
37 39
38 private: 40 private:
39 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager); 41 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager);
40 }; 42 };
41 43
42 } // namespace mus 44 } // namespace mus
43 45
44 #endif // COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ 46 #endif // COMPONENTS_MUS_COMMON_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « components/mus/common/mojo_gpu_memory_buffer.cc ('k') | components/mus/common/mojo_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698