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

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

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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_GLES2_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" 11 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
10 12
11 namespace mus { 13 namespace mus {
12 14
13 class MojoGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager { 15 class MojoGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager {
14 public: 16 public:
15 MojoGpuMemoryBufferManager(); 17 MojoGpuMemoryBufferManager();
16 ~MojoGpuMemoryBufferManager() override; 18 ~MojoGpuMemoryBufferManager() override;
17 19
18 // Overridden from gpu::GpuMemoryBufferManager: 20 // Overridden from gpu::GpuMemoryBufferManager:
19 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 21 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
20 const gfx::Size& size, 22 const gfx::Size& size,
21 gfx::BufferFormat format, 23 gfx::BufferFormat format,
22 gfx::BufferUsage usage, 24 gfx::BufferUsage usage,
23 int32_t surface_id) override; 25 int32_t surface_id) override;
24 scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( 26 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
25 const gfx::GpuMemoryBufferHandle& handle, 27 const gfx::GpuMemoryBufferHandle& handle,
26 const gfx::Size& size, 28 const gfx::Size& size,
27 gfx::BufferFormat format) override; 29 gfx::BufferFormat format) override;
28 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( 30 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
29 ClientBuffer buffer) override; 31 ClientBuffer buffer) override;
30 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, 32 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
31 const gpu::SyncToken& sync_token) override; 33 const gpu::SyncToken& sync_token) override;
32 34
33 private: 35 private:
34 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager); 36 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferManager);
35 }; 37 };
36 38
37 } // namespace mus 39 } // namespace mus
38 40
39 #endif // COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_ 41 #endif // COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/test/test_in_process_context_provider.h ('k') | components/mus/gles2/mojo_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698