| OLD | NEW |
| 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 SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_H_ | 5 #ifndef UI_AURA_MUS_CPP_MOJO_GPU_MEMORY_BUFFER_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_H_ | 6 #define UI_AURA_MUS_CPP_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 "services/ui/public/cpp/gpu_memory_buffer_impl.h" | 13 #include "ui/aura/mus/gpu_memory_buffer_impl.h" |
| 14 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
| 15 #include "ui/gfx/gpu_memory_buffer.h" | 15 #include "ui/gfx/gpu_memory_buffer.h" |
| 16 | 16 |
| 17 namespace ui { | 17 namespace aura { |
| 18 | 18 |
| 19 class MojoGpuMemoryBufferImpl : public ui::GpuMemoryBufferImpl { | 19 class MojoGpuMemoryBufferImpl : public GpuMemoryBufferImpl { |
| 20 public: | 20 public: |
| 21 ~MojoGpuMemoryBufferImpl() override; | 21 ~MojoGpuMemoryBufferImpl() override; |
| 22 | 22 |
| 23 static std::unique_ptr<gfx::GpuMemoryBuffer> Create(const gfx::Size& size, | 23 static std::unique_ptr<gfx::GpuMemoryBuffer> Create(const gfx::Size& size, |
| 24 gfx::BufferFormat format, | 24 gfx::BufferFormat format, |
| 25 gfx::BufferUsage usage); | 25 gfx::BufferUsage usage); |
| 26 static std::unique_ptr<gfx::GpuMemoryBuffer> CreateFromHandle( | 26 static std::unique_ptr<gfx::GpuMemoryBuffer> CreateFromHandle( |
| 27 const gfx::GpuMemoryBufferHandle& handle, | 27 const gfx::GpuMemoryBufferHandle& handle, |
| 28 const gfx::Size& size, | 28 const gfx::Size& size, |
| 29 gfx::BufferFormat format, | 29 gfx::BufferFormat format, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 49 uint32_t offset, | 49 uint32_t offset, |
| 50 int32_t stride); | 50 int32_t stride); |
| 51 | 51 |
| 52 std::unique_ptr<base::SharedMemory> shared_memory_; | 52 std::unique_ptr<base::SharedMemory> shared_memory_; |
| 53 const uint32_t offset_; | 53 const uint32_t offset_; |
| 54 const int32_t stride_; | 54 const int32_t stride_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferImpl); | 56 DISALLOW_COPY_AND_ASSIGN(MojoGpuMemoryBufferImpl); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace ui | 59 } // namespace aura |
| 60 | 60 |
| 61 #endif // SERVICES_UI_PUBLIC_CPP_MOJO_GPU_MEMORY_BUFFER_H_ | 61 #endif // UI_AURA_MUS_CPP_MOJO_GPU_MEMORY_BUFFER_H_ |
| OLD | NEW |