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

Side by Side Diff: components/mus/common/mojo_gpu_memory_buffer.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_H_ 5 #ifndef COMPONENTS_MUS_COMMON_MOJO_GPU_MEMORY_BUFFER_H_
6 #define COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_H_ 6 #define COMPONENTS_MUS_COMMON_MOJO_GPU_MEMORY_BUFFER_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/gles2/gpu_memory_buffer_impl.h" 13 #include "components/mus/common/gpu_memory_buffer_impl.h"
14 #include "components/mus/common/mus_common_export.h"
14 #include "ui/gfx/geometry/size.h" 15 #include "ui/gfx/geometry/size.h"
15 #include "ui/gfx/gpu_memory_buffer.h" 16 #include "ui/gfx/gpu_memory_buffer.h"
16 17
17 namespace mus { 18 namespace mus {
18 19
19 class MojoGpuMemoryBufferImpl : public mus::GpuMemoryBufferImpl { 20 class MUS_COMMON_EXPORT MojoGpuMemoryBufferImpl
21 : public mus::GpuMemoryBufferImpl {
20 public: 22 public:
21 MojoGpuMemoryBufferImpl(const gfx::Size& size, 23 MojoGpuMemoryBufferImpl(const gfx::Size& size,
22 gfx::BufferFormat format, 24 gfx::BufferFormat format,
23 std::unique_ptr<base::SharedMemory> shared_memory); 25 std::unique_ptr<base::SharedMemory> shared_memory);
24 ~MojoGpuMemoryBufferImpl() override; 26 ~MojoGpuMemoryBufferImpl() override;
25 27
26 static std::unique_ptr<gfx::GpuMemoryBuffer> Create(const gfx::Size& size, 28 static std::unique_ptr<gfx::GpuMemoryBuffer> Create(const gfx::Size& size,
27 gfx::BufferFormat format, 29 gfx::BufferFormat format,
28 gfx::BufferUsage usage); 30 gfx::BufferUsage usage);
29 31
(...skipping 12 matching lines...) Expand all
42 gfx::GpuMemoryBufferType GetBufferType() const override; 44 gfx::GpuMemoryBufferType GetBufferType() const override;
43 45
44 private: 46 private:
45 std::unique_ptr<base::SharedMemory> shared_memory_; 47 std::unique_ptr<base::SharedMemory> shared_memory_;
46 48
47 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferImpl); 49 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferImpl);
48 }; 50 };
49 51
50 } // namespace mus 52 } // namespace mus
51 53
52 #endif // COMPONENTS_MUS_GLES2_MOJO_GPU_MEMORY_BUFFER_H_ 54 #endif // COMPONENTS_MUS_COMMON_MOJO_GPU_MEMORY_BUFFER_H_
OLDNEW
« no previous file with comments | « components/mus/common/mojo_buffer_backing.cc ('k') | components/mus/common/mojo_gpu_memory_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698