Index: ui/ozone/platform/drm/common/drm_util.cc |
diff --git a/ui/ozone/platform/drm/common/drm_util.cc b/ui/ozone/platform/drm/common/drm_util.cc |
index 7d35a2a6c252fc4925ce6c3e6e0850518d80b138..48978e82a82d1a68588cf0c7bb75188137d53249 100644 |
--- a/ui/ozone/platform/drm/common/drm_util.cc |
+++ b/ui/ozone/platform/drm/common/drm_util.cc |
@@ -198,6 +198,32 @@ bool HasColorCorrectionMatrix(int fd, drmModeCrtc* crtc) { |
} // namespace |
+DisplayMode_Params GetDisplayModeParams(const display::DisplayMode& mode) { |
+ DisplayMode_Params params; |
+ params.size = mode.size(); |
+ params.is_interlaced = mode.is_interlaced(); |
+ params.refresh_rate = mode.refresh_rate(); |
+ return params; |
+} |
+ |
+std::unique_ptr<const display::DisplayMode> CreateDisplayModeFromParams( |
+ const DisplayMode_Params& pmode) { |
+ return base::MakeUnique<const display::DisplayMode>( |
+ pmode.size, pmode.is_interlaced, pmode.refresh_rate); |
+} |
+ |
+const gfx::Size ModeSize(const drmModeModeInfo& mode) { |
+ return gfx::Size(mode.hdisplay, mode.vdisplay); |
+} |
+ |
+float ModeRefreshRate(const drmModeModeInfo& mode) { |
+ return GetRefreshRate(mode); |
+} |
+ |
+bool ModeIsInterlaced(const drmModeModeInfo& mode) { |
+ return mode.flags & DRM_MODE_FLAG_INTERLACE; |
+} |
+ |
gfx::Size GetMaximumCursorSize(int fd) { |
uint64_t width = 0, height = 0; |
// Querying cursor dimensions is optional and is unsupported on older Chrome |