summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
diff options
context:
space:
mode:
authorJungi Byun <jungi.byun@lge.com>2021-01-27 08:24:23 +0900
committerElvis Lee <kwangwoong.lee@lge.com>2021-03-25 15:30:21 +0900
commitcf98abbc6ae9ba9373803ffe193f839324e0c80b (patch)
tree0c51b19bfeccd13a9e8c62e3c2986ac5e5c83b8e /src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
parente08b25efe4a7bec1004696bd23d9f8959158bd60 (diff)
Replace scale with devicePixelRatio for non-integer scaling
The 'scale' event from wayland cannot support non-integer scaling which was originally supported in Qt. As default, devicePixelRatio follows the 'scale' so that the high DPI still works as the mechanism in Wayland. But if non-integer scaling factor such as 150% is needed, it can be supported to override the devicePixelRatio. Change-Id: I63a04db27bd521264b6d0904e1ddd05a572dc970 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Jungi Byun <jungi.byun@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp')
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index 68f95d30f..9e6c11884 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -196,7 +196,7 @@ public:
QOpenGLTextureCache *cache = QOpenGLTextureCache::cacheForContext(m_context->context());
QSize surfaceSize = window->surfaceSize();
- int scale = window->scale() ;
+ qreal scale = window->scale() ;
glViewport(0, 0, surfaceSize.width() * scale, surfaceSize.height() * scale);
//Draw Decoration