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

Side by Side Diff: components/mus/common/mojo_buffer_backing.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
« no previous file with comments | « components/mus/common/gpu_service.cc ('k') | components/mus/common/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_COMMON_MOJO_BUFFER_BACKING_H_
6 #define COMPONENTS_MUS_GLES2_MOJO_BUFFER_BACKING_H_ 6 #define COMPONENTS_MUS_COMMON_MOJO_BUFFER_BACKING_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "components/mus/common/mus_common_export.h"
13 #include "gpu/command_buffer/common/buffer.h" 14 #include "gpu/command_buffer/common/buffer.h"
14 #include "mojo/public/cpp/system/core.h" 15 #include "mojo/public/cpp/system/core.h"
15 16
16 namespace mus { 17 namespace mus {
17 18
18 class MojoBufferBacking : public gpu::BufferBacking { 19 class MUS_COMMON_EXPORT MojoBufferBacking : public gpu::BufferBacking {
19 public: 20 public:
20 MojoBufferBacking(mojo::ScopedSharedBufferHandle handle, 21 MojoBufferBacking(mojo::ScopedSharedBufferHandle handle,
21 void* memory, 22 void* memory,
22 size_t size); 23 size_t size);
23 ~MojoBufferBacking() override; 24 ~MojoBufferBacking() override;
24 25
25 static std::unique_ptr<gpu::BufferBacking> Create( 26 static std::unique_ptr<gpu::BufferBacking> Create(
26 mojo::ScopedSharedBufferHandle handle, 27 mojo::ScopedSharedBufferHandle handle,
27 size_t size); 28 size_t size);
28 29
29 void* GetMemory() const override; 30 void* GetMemory() const override;
30 size_t GetSize() const override; 31 size_t GetSize() const override;
31 32
32 private: 33 private:
33 mojo::ScopedSharedBufferHandle handle_; 34 mojo::ScopedSharedBufferHandle handle_;
34 void* memory_; 35 void* memory_;
35 size_t size_; 36 size_t size_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(MojoBufferBacking); 38 DISALLOW_COPY_AND_ASSIGN(MojoBufferBacking);
38 }; 39 };
39 40
40 } // namespace mus 41 } // namespace mus
41 42
42 #endif // COMPONENTS_MUS_GLES2_MOJO_BUFFER_BACKING_H_ 43 #endif // COMPONENTS_MUS_COMMON_MOJO_BUFFER_BACKING_H_
OLDNEW
« no previous file with comments | « components/mus/common/gpu_service.cc ('k') | components/mus/common/mojo_buffer_backing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698