QWaylandScreen: Implement subpixelAntialiasingTypeHint
It isn't really used anywhere yet, since on Unix QFontconfigDatabase doesn't use the screen's information. Pick-to: 6.7 6.6 6.5 Change-Id: Icab81b2bf8df1a23223a74f2d4aee94601e0bea3 Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
parent
4e3fc377ad
commit
033bb3903a
@ -190,6 +190,32 @@ QPlatformCursor *QWaylandScreen::cursor() const
|
||||
}
|
||||
#endif // QT_CONFIG(cursor)
|
||||
|
||||
QPlatformScreen::SubpixelAntialiasingType QWaylandScreen::subpixelAntialiasingTypeHint() const
|
||||
{
|
||||
QPlatformScreen::SubpixelAntialiasingType type = QPlatformScreen::subpixelAntialiasingTypeHint();
|
||||
if (type == QPlatformScreen::Subpixel_None) {
|
||||
switch (mSubpixel) {
|
||||
case wl_output::subpixel_unknown:
|
||||
case wl_output::subpixel_none:
|
||||
type = QPlatformScreen::Subpixel_None;
|
||||
break;
|
||||
case wl_output::subpixel_horizontal_rgb:
|
||||
type = QPlatformScreen::Subpixel_RGB;
|
||||
break;
|
||||
case wl_output::subpixel_horizontal_bgr:
|
||||
type = QPlatformScreen::Subpixel_BGR;
|
||||
break;
|
||||
case wl_output::subpixel_vertical_rgb:
|
||||
type = QPlatformScreen::Subpixel_VRGB;
|
||||
break;
|
||||
case wl_output::subpixel_vertical_bgr:
|
||||
type = QPlatformScreen::Subpixel_VBGR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
QWaylandScreen *QWaylandScreen::waylandScreenFromWindow(QWindow *window)
|
||||
{
|
||||
QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(window);
|
||||
@ -254,11 +280,10 @@ void QWaylandScreen::output_geometry(int32_t x, int32_t y,
|
||||
const QString &model,
|
||||
int32_t transform)
|
||||
{
|
||||
Q_UNUSED(subpixel);
|
||||
|
||||
mManufacturer = make;
|
||||
mModel = model;
|
||||
|
||||
mSubpixel = subpixel;
|
||||
mTransform = transform;
|
||||
|
||||
mPhysicalSize = QSize(width, height);
|
||||
|
@ -73,6 +73,8 @@ public:
|
||||
QPlatformCursor *cursor() const override;
|
||||
#endif
|
||||
|
||||
SubpixelAntialiasingType subpixelAntialiasingTypeHint() const override;
|
||||
|
||||
uint32_t outputId() const { return m_outputId; }
|
||||
::wl_output *output() const override
|
||||
{
|
||||
@ -120,6 +122,7 @@ protected:
|
||||
int mScale = 1;
|
||||
int mDepth = 32;
|
||||
int mRefreshRate = 60000;
|
||||
int mSubpixel = -1;
|
||||
int mTransform = -1;
|
||||
QImage::Format mFormat = QImage::Format_ARGB32_Premultiplied;
|
||||
QSize mPhysicalSize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user