eglfs_kms: Subpixel antialiasing type
[ChangeLog][QPA][eglfs][kms] Provide subpixel antialiasing type. Change-Id: I1eed487cea675d988a128f63a9d5c2c0ddeae21f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
9facf1be9b
commit
0ea56cc075
@ -284,6 +284,7 @@ QEglFSKmsScreen *QEglFSKmsDevice::screenForConnector(drmModeResPtr resources, dr
|
|||||||
false,
|
false,
|
||||||
drmModeGetCrtc(m_dri_fd, crtc_id),
|
drmModeGetCrtc(m_dri_fd, crtc_id),
|
||||||
modes,
|
modes,
|
||||||
|
connector->subpixel,
|
||||||
connectorProperty(connector, QByteArrayLiteral("DPMS"))
|
connectorProperty(connector, QByteArrayLiteral("DPMS"))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -321,6 +321,24 @@ qreal QEglFSKmsScreen::refreshRate() const
|
|||||||
return refresh > 0 ? refresh : 60;
|
return refresh > 0 ? refresh : 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QPlatformScreen::SubpixelAntialiasingType QEglFSKmsScreen::subpixelAntialiasingTypeHint() const
|
||||||
|
{
|
||||||
|
switch (m_output.subpixel) {
|
||||||
|
default:
|
||||||
|
case DRM_MODE_SUBPIXEL_UNKNOWN:
|
||||||
|
case DRM_MODE_SUBPIXEL_NONE:
|
||||||
|
return Subpixel_None;
|
||||||
|
case DRM_MODE_SUBPIXEL_HORIZONTAL_RGB:
|
||||||
|
return Subpixel_RGB;
|
||||||
|
case DRM_MODE_SUBPIXEL_HORIZONTAL_BGR:
|
||||||
|
return Subpixel_BGR;
|
||||||
|
case DRM_MODE_SUBPIXEL_VERTICAL_RGB:
|
||||||
|
return Subpixel_VRGB;
|
||||||
|
case DRM_MODE_SUBPIXEL_VERTICAL_BGR:
|
||||||
|
return Subpixel_VBGR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QPlatformScreen::PowerState QEglFSKmsScreen::powerState() const
|
QPlatformScreen::PowerState QEglFSKmsScreen::powerState() const
|
||||||
{
|
{
|
||||||
return m_powerState;
|
return m_powerState;
|
||||||
|
@ -60,6 +60,7 @@ struct QEglFSKmsOutput
|
|||||||
bool mode_set;
|
bool mode_set;
|
||||||
drmModeCrtcPtr saved_crtc;
|
drmModeCrtcPtr saved_crtc;
|
||||||
QList<drmModeModeInfo> modes;
|
QList<drmModeModeInfo> modes;
|
||||||
|
int subpixel;
|
||||||
drmModePropertyPtr dpms_prop;
|
drmModePropertyPtr dpms_prop;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -104,6 +105,8 @@ public:
|
|||||||
QEglFSKmsOutput &output() { return m_output; }
|
QEglFSKmsOutput &output() { return m_output; }
|
||||||
void restoreMode();
|
void restoreMode();
|
||||||
|
|
||||||
|
SubpixelAntialiasingType subpixelAntialiasingTypeHint() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
QPlatformScreen::PowerState powerState() const Q_DECL_OVERRIDE;
|
QPlatformScreen::PowerState powerState() const Q_DECL_OVERRIDE;
|
||||||
void setPowerState(QPlatformScreen::PowerState state) Q_DECL_OVERRIDE;
|
void setPowerState(QPlatformScreen::PowerState state) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user