| 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> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void SetWindowBounds(gfx::AcceleratedWidget widget, const gfx::Rect& bounds); | 85 void SetWindowBounds(gfx::AcceleratedWidget widget, const gfx::Rect& bounds); |
| 86 void SetCursor(const gfx::AcceleratedWidget& widget, | 86 void SetCursor(const gfx::AcceleratedWidget& widget, |
| 87 const std::vector<SkBitmap>& bitmaps, | 87 const std::vector<SkBitmap>& bitmaps, |
| 88 const gfx::Point& location, | 88 const gfx::Point& location, |
| 89 int32_t frame_delay_ms) override; | 89 int32_t frame_delay_ms) override; |
| 90 void MoveCursor(const gfx::AcceleratedWidget& widget, | 90 void MoveCursor(const gfx::AcceleratedWidget& widget, |
| 91 const gfx::Point& location) override; | 91 const gfx::Point& location) override; |
| 92 void CheckOverlayCapabilities( | 92 void CheckOverlayCapabilities( |
| 93 gfx::AcceleratedWidget widget, | 93 gfx::AcceleratedWidget widget, |
| 94 const std::vector<OverlayCheck_Params>& overlays, | 94 const std::vector<OverlayCheck_Params>& overlays, |
| 95 const base::Callback<void(gfx::AcceleratedWidget, | 95 base::OnceCallback<void(gfx::AcceleratedWidget, |
| 96 const std::vector<OverlayCheck_Params>&)>& | 96 const std::vector<OverlayCheck_Params>&)> |
| 97 callback); | 97 callback); |
| 98 void RefreshNativeDisplays( | 98 void RefreshNativeDisplays( |
| 99 const base::Callback<void(const std::vector<DisplaySnapshot_Params>&)>& | 99 base::OnceCallback<void(const std::vector<DisplaySnapshot_Params>&)> |
| 100 callback); | 100 callback); |
| 101 void ConfigureNativeDisplay( | 101 void ConfigureNativeDisplay(int64_t id, |
| 102 int64_t id, | 102 const DisplayMode_Params& mode, |
| 103 const DisplayMode_Params& mode, | 103 const gfx::Point& origin, |
| 104 const gfx::Point& origin, | 104 base::OnceCallback<void(int64_t, bool)> callback); |
| 105 const base::Callback<void(int64_t, bool)>& callback); | 105 void DisableNativeDisplay(int64_t id, |
| 106 void DisableNativeDisplay( | 106 base::OnceCallback<void(int64_t, bool)> callback); |
| 107 int64_t id, | 107 void TakeDisplayControl(base::OnceCallback<void(bool)> callback); |
| 108 const base::Callback<void(int64_t, bool)>& callback); | 108 void RelinquishDisplayControl(base::OnceCallback<void(bool)> callback); |
| 109 void TakeDisplayControl(const base::Callback<void(bool)>& callback); | |
| 110 void RelinquishDisplayControl(const base::Callback<void(bool)>& callback); | |
| 111 void AddGraphicsDevice(const base::FilePath& path, | 109 void AddGraphicsDevice(const base::FilePath& path, |
| 112 const base::FileDescriptor& fd); | 110 const base::FileDescriptor& fd); |
| 113 void RemoveGraphicsDevice(const base::FilePath& path); | 111 void RemoveGraphicsDevice(const base::FilePath& path); |
| 114 void GetHDCPState( | 112 void GetHDCPState( |
| 115 int64_t display_id, | 113 int64_t display_id, |
| 116 const base::Callback<void(int64_t, bool, display::HDCPState)>& callback); | 114 base::OnceCallback<void(int64_t, bool, display::HDCPState)> callback); |
| 117 void SetHDCPState(int64_t display_id, | 115 void SetHDCPState(int64_t display_id, |
| 118 display::HDCPState state, | 116 display::HDCPState state, |
| 119 const base::Callback<void(int64_t, bool)>& callback); | 117 base::OnceCallback<void(int64_t, bool)> callback); |
| 120 void SetColorCorrection( | 118 void SetColorCorrection( |
| 121 int64_t display_id, | 119 int64_t display_id, |
| 122 const std::vector<display::GammaRampRGBEntry>& degamma_lut, | 120 const std::vector<display::GammaRampRGBEntry>& degamma_lut, |
| 123 const std::vector<display::GammaRampRGBEntry>& gamma_lut, | 121 const std::vector<display::GammaRampRGBEntry>& gamma_lut, |
| 124 const std::vector<float>& correction_matrix); | 122 const std::vector<float>& correction_matrix); |
| 125 | 123 |
| 126 // base::Thread: | 124 // base::Thread: |
| 127 void Init() override; | 125 void Init() override; |
| 128 | 126 |
| 129 // Mojo support for DeviceCursorRequest. | 127 // Mojo support for DeviceCursorRequest. |
| 130 void AddBinding(ozone::mojom::DeviceCursorRequest request); | 128 void AddBinding(ozone::mojom::DeviceCursorRequest request); |
| 131 | 129 |
| 132 private: | 130 private: |
| 133 std::unique_ptr<DrmDeviceManager> device_manager_; | 131 std::unique_ptr<DrmDeviceManager> device_manager_; |
| 134 std::unique_ptr<ScanoutBufferGenerator> buffer_generator_; | 132 std::unique_ptr<ScanoutBufferGenerator> buffer_generator_; |
| 135 std::unique_ptr<ScreenManager> screen_manager_; | 133 std::unique_ptr<ScreenManager> screen_manager_; |
| 136 std::unique_ptr<DrmGpuDisplayManager> display_manager_; | 134 std::unique_ptr<DrmGpuDisplayManager> display_manager_; |
| 137 | 135 |
| 138 // The mojo implementation requires a BindingSet because the DrmThread serves | 136 // The mojo implementation requires a BindingSet because the DrmThread serves |
| 139 // requests from two different client threads. | 137 // requests from two different client threads. |
| 140 mojo::BindingSet<ozone::mojom::DeviceCursor> bindings_; | 138 mojo::BindingSet<ozone::mojom::DeviceCursor> bindings_; |
| 141 | 139 |
| 142 DISALLOW_COPY_AND_ASSIGN(DrmThread); | 140 DISALLOW_COPY_AND_ASSIGN(DrmThread); |
| 143 }; | 141 }; |
| 144 | 142 |
| 145 } // namespace ui | 143 } // namespace ui |
| 146 | 144 |
| 147 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_H_ | 145 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_H_ |
| OLD | NEW |