| 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 UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/files/scoped_file.h" | 12 #include "base/files/scoped_file.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
| 16 #include "ui/gfx/native_pixmap_handle_ozone.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 17 #include "ui/gfx/vsync_provider.h" | 18 #include "ui/gfx/vsync_provider.h" |
| 18 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | 19 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
| 19 #include "ui/ozone/public/surface_ozone_egl.h" | 20 #include "ui/ozone/public/surface_ozone_egl.h" |
| 20 | 21 |
| 21 namespace base { | 22 namespace base { |
| 22 struct FileDescriptor; | 23 struct FileDescriptor; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace gfx { | 26 namespace gfx { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 56 | 57 |
| 57 // Must be called on the DRM thread. | 58 // Must be called on the DRM thread. |
| 58 void CreateBuffer(gfx::AcceleratedWidget widget, | 59 void CreateBuffer(gfx::AcceleratedWidget widget, |
| 59 const gfx::Size& size, | 60 const gfx::Size& size, |
| 60 gfx::BufferFormat format, | 61 gfx::BufferFormat format, |
| 61 gfx::BufferUsage usage, | 62 gfx::BufferUsage usage, |
| 62 scoped_refptr<GbmBuffer>* buffer); | 63 scoped_refptr<GbmBuffer>* buffer); |
| 63 void CreateBufferFromFds(const gfx::Size& size, | 64 void CreateBufferFromFds(const gfx::Size& size, |
| 64 gfx::BufferFormat format, | 65 gfx::BufferFormat format, |
| 65 std::vector<base::ScopedFD>&& fds, | 66 std::vector<base::ScopedFD>&& fds, |
| 66 std::vector<int> strides, | 67 const std::vector<gfx::NativePixmapPlane>& planes, |
| 67 std::vector<int> offsets, | |
| 68 scoped_refptr<GbmBuffer>* buffer); | 68 scoped_refptr<GbmBuffer>* buffer); |
| 69 | 69 |
| 70 void GetScanoutFormats(gfx::AcceleratedWidget widget, | 70 void GetScanoutFormats(gfx::AcceleratedWidget widget, |
| 71 std::vector<gfx::BufferFormat>* scanout_formats); | 71 std::vector<gfx::BufferFormat>* scanout_formats); |
| 72 void SchedulePageFlip(gfx::AcceleratedWidget widget, | 72 void SchedulePageFlip(gfx::AcceleratedWidget widget, |
| 73 const std::vector<OverlayPlane>& planes, | 73 const std::vector<OverlayPlane>& planes, |
| 74 const SwapCompletionCallback& callback); | 74 const SwapCompletionCallback& callback); |
| 75 void GetVSyncParameters( | 75 void GetVSyncParameters( |
| 76 gfx::AcceleratedWidget widget, | 76 gfx::AcceleratedWidget widget, |
| 77 const gfx::VSyncProvider::UpdateVSyncCallback& callback); | 77 const gfx::VSyncProvider::UpdateVSyncCallback& callback); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 std::unique_ptr<ScanoutBufferGenerator> buffer_generator_; | 126 std::unique_ptr<ScanoutBufferGenerator> buffer_generator_; |
| 127 std::unique_ptr<ScreenManager> screen_manager_; | 127 std::unique_ptr<ScreenManager> screen_manager_; |
| 128 std::unique_ptr<DrmGpuDisplayManager> display_manager_; | 128 std::unique_ptr<DrmGpuDisplayManager> display_manager_; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(DrmThread); | 130 DISALLOW_COPY_AND_ASSIGN(DrmThread); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 } // namespace ui | 133 } // namespace ui |
| 134 | 134 |
| 135 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_H_ | 135 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_H_ |
| OLD | NEW |