| 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 "mojo/public/cpp/bindings/binding_set.h" | 16 #include "mojo/public/cpp/bindings/binding_set.h" |
| 17 #include "ui/gfx/native_pixmap_handle.h" | 17 #include "ui/gfx/native_pixmap_handle.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 19 #include "ui/gfx/vsync_provider.h" | 19 #include "ui/gfx/vsync_provider.h" |
| 20 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | 20 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
| 21 #include "ui/ozone/platform/drm/common/display_types.h" |
| 21 #include "ui/ozone/public/interfaces/device_cursor.mojom.h" | 22 #include "ui/ozone/public/interfaces/device_cursor.mojom.h" |
| 22 #include "ui/ozone/public/swap_completion_callback.h" | 23 #include "ui/ozone/public/swap_completion_callback.h" |
| 23 | 24 |
| 24 namespace base { | 25 namespace base { |
| 25 struct FileDescriptor; | 26 struct FileDescriptor; |
| 26 } | 27 } |
| 27 | 28 |
| 28 namespace display { | 29 namespace display { |
| 29 class DisplayMode; | 30 class DisplayMode; |
| 30 struct GammaRampRGBEntry; | 31 struct GammaRampRGBEntry; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 void MoveCursor(const gfx::AcceleratedWidget& widget, | 92 void MoveCursor(const gfx::AcceleratedWidget& widget, |
| 92 const gfx::Point& location) override; | 93 const gfx::Point& location) override; |
| 93 void CheckOverlayCapabilities( | 94 void CheckOverlayCapabilities( |
| 94 gfx::AcceleratedWidget widget, | 95 gfx::AcceleratedWidget widget, |
| 95 const std::vector<OverlayCheck_Params>& overlays, | 96 const std::vector<OverlayCheck_Params>& overlays, |
| 96 base::OnceCallback<void(gfx::AcceleratedWidget, | 97 base::OnceCallback<void(gfx::AcceleratedWidget, |
| 97 const std::vector<OverlayCheck_Params>&, | 98 const std::vector<OverlayCheck_Params>&, |
| 98 const std::vector<OverlayCheckReturn_Params>&)> | 99 const std::vector<OverlayCheckReturn_Params>&)> |
| 99 callback); | 100 callback); |
| 100 void RefreshNativeDisplays( | 101 void RefreshNativeDisplays( |
| 101 base::OnceCallback<void(const std::vector<DisplaySnapshot_Params>&)> | 102 base::OnceCallback<void(MovableDisplaySnapshots)> callback); |
| 102 callback); | |
| 103 void ConfigureNativeDisplay(int64_t id, | 103 void ConfigureNativeDisplay(int64_t id, |
| 104 std::unique_ptr<const display::DisplayMode> mode, | 104 std::unique_ptr<const display::DisplayMode> mode, |
| 105 const gfx::Point& origin, | 105 const gfx::Point& origin, |
| 106 base::OnceCallback<void(int64_t, bool)> callback); | 106 base::OnceCallback<void(int64_t, bool)> callback); |
| 107 void DisableNativeDisplay(int64_t id, | 107 void DisableNativeDisplay(int64_t id, |
| 108 base::OnceCallback<void(int64_t, bool)> callback); | 108 base::OnceCallback<void(int64_t, bool)> callback); |
| 109 void TakeDisplayControl(base::OnceCallback<void(bool)> callback); | 109 void TakeDisplayControl(base::OnceCallback<void(bool)> callback); |
| 110 void RelinquishDisplayControl(base::OnceCallback<void(bool)> callback); | 110 void RelinquishDisplayControl(base::OnceCallback<void(bool)> callback); |
| 111 void AddGraphicsDevice(const base::FilePath& path, | 111 void AddGraphicsDevice(const base::FilePath& path, |
| 112 const base::FileDescriptor& fd); | 112 const base::FileDescriptor& fd); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 138 // The mojo implementation requires a BindingSet because the DrmThread serves | 138 // The mojo implementation requires a BindingSet because the DrmThread serves |
| 139 // requests from two different client threads. | 139 // requests from two different client threads. |
| 140 mojo::BindingSet<ozone::mojom::DeviceCursor> bindings_; | 140 mojo::BindingSet<ozone::mojom::DeviceCursor> bindings_; |
| 141 | 141 |
| 142 DISALLOW_COPY_AND_ASSIGN(DrmThread); | 142 DISALLOW_COPY_AND_ASSIGN(DrmThread); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace ui | 145 } // namespace ui |
| 146 | 146 |
| 147 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_H_ | 147 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_H_ |
| OLD | NEW |