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

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

Issue 1906623003: Convert //components/mus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « components/mus/gles2/gpu_state.h ('k') | components/mus/gles2/mojo_buffer_backing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BUFFER_BACKING_H_ 5 #ifndef COMPONENTS_MUS_GLES2_MOJO_BUFFER_BACKING_H_
6 #define COMPONENTS_MUS_GLES2_MOJO_BUFFER_BACKING_H_ 6 #define COMPONENTS_MUS_GLES2_MOJO_BUFFER_BACKING_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "gpu/command_buffer/common/buffer.h" 13 #include "gpu/command_buffer/common/buffer.h"
13 #include "mojo/public/cpp/system/core.h" 14 #include "mojo/public/cpp/system/core.h"
14 15
15 namespace mus { 16 namespace mus {
16 17
17 class MojoBufferBacking : public gpu::BufferBacking { 18 class MojoBufferBacking : public gpu::BufferBacking {
18 public: 19 public:
19 MojoBufferBacking(mojo::ScopedSharedBufferHandle handle, 20 MojoBufferBacking(mojo::ScopedSharedBufferHandle handle,
20 void* memory, 21 void* memory,
21 size_t size); 22 size_t size);
22 ~MojoBufferBacking() override; 23 ~MojoBufferBacking() override;
23 24
24 static scoped_ptr<gpu::BufferBacking> Create( 25 static std::unique_ptr<gpu::BufferBacking> Create(
25 mojo::ScopedSharedBufferHandle handle, 26 mojo::ScopedSharedBufferHandle handle,
26 size_t size); 27 size_t size);
27 28
28 void* GetMemory() const override; 29 void* GetMemory() const override;
29 size_t GetSize() const override; 30 size_t GetSize() const override;
30 31
31 private: 32 private:
32 mojo::ScopedSharedBufferHandle handle_; 33 mojo::ScopedSharedBufferHandle handle_;
33 void* memory_; 34 void* memory_;
34 size_t size_; 35 size_t size_;
35 36
36 DISALLOW_COPY_AND_ASSIGN(MojoBufferBacking); 37 DISALLOW_COPY_AND_ASSIGN(MojoBufferBacking);
37 }; 38 };
38 39
39 } // namespace mus 40 } // namespace mus
40 41
41 #endif // COMPONENTS_MUS_GLES2_MOJO_BUFFER_BACKING_H_ 42 #endif // COMPONENTS_MUS_GLES2_MOJO_BUFFER_BACKING_H_
OLDNEW
« no previous file with comments | « components/mus/gles2/gpu_state.h ('k') | components/mus/gles2/mojo_buffer_backing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698