| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_GPU_MEMORY_BUFFER_IMPL_H_ | 5 #ifndef UI_AURA_MUS_CPP_GPU_MEMORY_BUFFER_IMPL_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_GPU_MEMORY_BUFFER_IMPL_H_ | 6 #define UI_AURA_MUS_CPP_GPU_MEMORY_BUFFER_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "gpu/command_buffer/common/sync_token.h" | |
| 13 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
| 14 #include "ui/gfx/gpu_memory_buffer.h" | 13 #include "ui/gfx/gpu_memory_buffer.h" |
| 15 | 14 |
| 16 #if defined(USE_OZONE) | 15 #if defined(USE_OZONE) |
| 17 #include "ui/ozone/public/native_pixmap.h" | 16 #include "ui/ozone/public/native_pixmap.h" |
| 18 #endif | 17 #endif |
| 19 | 18 |
| 20 namespace ui { | 19 namespace aura { |
| 21 | 20 |
| 22 // Provides common implementation of a GPU memory buffer. | 21 // Provides common implementation of a GPU memory buffer. |
| 23 class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { | 22 class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { |
| 24 public: | 23 public: |
| 25 ~GpuMemoryBufferImpl() override; | 24 ~GpuMemoryBufferImpl() override; |
| 26 | 25 |
| 27 // Type-checking upcast routine. Returns an NULL on failure. | 26 // Type-checking upcast routine. Returns an NULL on failure. |
| 28 static GpuMemoryBufferImpl* FromClientBuffer(ClientBuffer buffer); | 27 static GpuMemoryBufferImpl* FromClientBuffer(ClientBuffer buffer); |
| 29 | 28 |
| 30 // Overridden from gfx::GpuMemoryBuffer: | 29 // Overridden from gfx::GpuMemoryBuffer: |
| (...skipping 17 matching lines...) Expand all Loading... |
| 48 | 47 |
| 49 const gfx::GpuMemoryBufferId id_; | 48 const gfx::GpuMemoryBufferId id_; |
| 50 const gfx::Size size_; | 49 const gfx::Size size_; |
| 51 const gfx::BufferFormat format_; | 50 const gfx::BufferFormat format_; |
| 52 bool mapped_; | 51 bool mapped_; |
| 53 | 52 |
| 54 private: | 53 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImpl); | 54 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImpl); |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 } // namespace ui | 57 } // namespace aura |
| 59 | 58 |
| 60 #endif // SERVICES_UI_PUBLIC_CPP_GPU_MEMORY_BUFFER_IMPL_H_ | 59 #endif // UI_AURA_MUS_CPP_GPU_MEMORY_BUFFER_IMPL_H_ |
| OLD | NEW |