OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GPU_DISPLAY_MANAGER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ |
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
15 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | 15 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
16 | 16 |
17 namespace display { | 17 namespace display { |
| 18 class DisplayMode; |
18 struct GammaRampRGBEntry; | 19 struct GammaRampRGBEntry; |
19 } | 20 } |
20 | 21 |
21 namespace ui { | 22 namespace ui { |
22 | 23 |
23 class DrmDeviceManager; | 24 class DrmDeviceManager; |
24 class DrmDisplay; | 25 class DrmDisplay; |
25 class ScreenManager; | 26 class ScreenManager; |
26 | 27 |
27 class DrmGpuDisplayManager { | 28 class DrmGpuDisplayManager { |
28 public: | 29 public: |
29 DrmGpuDisplayManager(ScreenManager* screen_manager, | 30 DrmGpuDisplayManager(ScreenManager* screen_manager, |
30 DrmDeviceManager* drm_device_manager); | 31 DrmDeviceManager* drm_device_manager); |
31 ~DrmGpuDisplayManager(); | 32 ~DrmGpuDisplayManager(); |
32 | 33 |
33 // Returns a list of the connected displays. When this is called the list of | 34 // Returns a list of the connected displays. When this is called the list of |
34 // displays is refreshed. | 35 // displays is refreshed. |
35 std::vector<DisplaySnapshot_Params> GetDisplays(); | 36 std::vector<DisplaySnapshot_Params> GetDisplays(); |
36 | 37 |
37 // Returns all scanout formats for |widget| representing a particular display | 38 // Returns all scanout formats for |widget| representing a particular display |
38 // controller or default display controller for kNullAcceleratedWidget. | 39 // controller or default display controller for kNullAcceleratedWidget. |
39 void GetScanoutFormats(gfx::AcceleratedWidget widget, | 40 void GetScanoutFormats(gfx::AcceleratedWidget widget, |
40 std::vector<gfx::BufferFormat>* scanout_formats); | 41 std::vector<gfx::BufferFormat>* scanout_formats); |
41 | 42 |
42 // Takes/releases the control of the DRM devices. | 43 // Takes/releases the control of the DRM devices. |
43 bool TakeDisplayControl(); | 44 bool TakeDisplayControl(); |
44 void RelinquishDisplayControl(); | 45 void RelinquishDisplayControl(); |
45 | 46 |
46 bool ConfigureDisplay(int64_t id, | 47 bool ConfigureDisplay(int64_t id, |
47 const DisplayMode_Params& mode, | 48 const display::DisplayMode& display_mode, |
48 const gfx::Point& origin); | 49 const gfx::Point& origin); |
49 bool DisableDisplay(int64_t id); | 50 bool DisableDisplay(int64_t id); |
50 bool GetHDCPState(int64_t display_id, display::HDCPState* state); | 51 bool GetHDCPState(int64_t display_id, display::HDCPState* state); |
51 bool SetHDCPState(int64_t display_id, display::HDCPState state); | 52 bool SetHDCPState(int64_t display_id, display::HDCPState state); |
52 void SetColorCorrection( | 53 void SetColorCorrection( |
53 int64_t id, | 54 int64_t id, |
54 const std::vector<display::GammaRampRGBEntry>& degamma_lut, | 55 const std::vector<display::GammaRampRGBEntry>& degamma_lut, |
55 const std::vector<display::GammaRampRGBEntry>& gamma_lut, | 56 const std::vector<display::GammaRampRGBEntry>& gamma_lut, |
56 const std::vector<float>& correction_matrix); | 57 const std::vector<float>& correction_matrix); |
57 | 58 |
(...skipping 10 matching lines...) Expand all Loading... |
68 DrmDeviceManager* drm_device_manager_; // Not owned. | 69 DrmDeviceManager* drm_device_manager_; // Not owned. |
69 | 70 |
70 std::vector<std::unique_ptr<DrmDisplay>> displays_; | 71 std::vector<std::unique_ptr<DrmDisplay>> displays_; |
71 | 72 |
72 DISALLOW_COPY_AND_ASSIGN(DrmGpuDisplayManager); | 73 DISALLOW_COPY_AND_ASSIGN(DrmGpuDisplayManager); |
73 }; | 74 }; |
74 | 75 |
75 } // namespace ui | 76 } // namespace ui |
76 | 77 |
77 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ | 78 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_GPU_DISPLAY_MANAGER_H_ |
OLD | NEW |