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_COMMON_DRM_UTIL_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ |
6 #define UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ | 6 #define UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "ui/display/types/display_mode.h" |
15 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | 16 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
16 #include "ui/ozone/platform/drm/common/scoped_drm_types.h" | 17 #include "ui/ozone/platform/drm/common/scoped_drm_types.h" |
17 | 18 |
18 typedef struct _drmModeModeInfo drmModeModeInfo; | 19 typedef struct _drmModeModeInfo drmModeModeInfo; |
19 | 20 |
| 21 namespace display { |
| 22 class DisplayMode; |
| 23 } // namespace display |
| 24 |
20 namespace gfx { | 25 namespace gfx { |
21 class Point; | 26 class Point; |
22 } | 27 } |
23 | 28 |
24 namespace ui { | 29 namespace ui { |
25 | 30 |
26 // Representation of the information required to initialize and configure a | 31 // Representation of the information required to initialize and configure a |
27 // native display. |index| is the position of the connection and will be | 32 // native display. |index| is the position of the connection and will be |
28 // used to generate a unique identifier for the display. | 33 // used to generate a unique identifier for the display. |
29 class HardwareDisplayControllerInfo { | 34 class HardwareDisplayControllerInfo { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 size_t device_index, | 68 size_t device_index, |
64 const gfx::Point& origin); | 69 const gfx::Point& origin); |
65 | 70 |
66 int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format); | 71 int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format); |
67 gfx::BufferFormat GetBufferFormatFromFourCCFormat(int format); | 72 gfx::BufferFormat GetBufferFormatFromFourCCFormat(int format); |
68 | 73 |
69 int GetFourCCFormatForOpaqueFramebuffer(gfx::BufferFormat format); | 74 int GetFourCCFormatForOpaqueFramebuffer(gfx::BufferFormat format); |
70 | 75 |
71 gfx::Size GetMaximumCursorSize(int fd); | 76 gfx::Size GetMaximumCursorSize(int fd); |
72 | 77 |
| 78 DisplayMode_Params GetDisplayModeParams(const display::DisplayMode& mode); |
| 79 |
| 80 std::unique_ptr<const display::DisplayMode> CreateDisplayModeFromParams( |
| 81 const DisplayMode_Params& pmode); |
| 82 |
| 83 bool MatchMode(const display::DisplayMode& display_mode, |
| 84 const drmModeModeInfo& m); |
| 85 |
| 86 const gfx::Size ModeSize(const drmModeModeInfo& mode); |
| 87 |
| 88 float ModeRefreshRate(const drmModeModeInfo& mode); |
| 89 |
| 90 bool ModeIsInterlaced(const drmModeModeInfo& mode); |
| 91 |
73 } // namespace ui | 92 } // namespace ui |
74 | 93 |
75 #endif // UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ | 94 #endif // UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ |
OLD | NEW |