diff options
author | Filipe Azevedo <filipe.azevedo@kdab.com> | 2016-12-14 14:25:23 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2017-04-09 16:18:28 +0000 |
commit | 617d6dc2017f49a84e4aeb15a40d78462be62326 (patch) | |
tree | 3ae0e19c6bf5958c9748e19d50e46e3253846424 /src/quick/scenegraph/qsgwindowsrenderloop.cpp | |
parent | ab0c47e5ef03eab9c80246e4d5c1af53a29ab0e1 (diff) |
Fix hidpi support for opengl window grabbing
Now set the QImage devicePixelRatio so the content is correct on all
screens.
Task-number: QTBUG-53795
Change-Id: If94edf901da1285afe9bb847b8973d568a2b7082
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgwindowsrenderloop.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgwindowsrenderloop.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgwindowsrenderloop.cpp b/src/quick/scenegraph/qsgwindowsrenderloop.cpp index 13388c0841..209715fff6 100644 --- a/src/quick/scenegraph/qsgwindowsrenderloop.cpp +++ b/src/quick/scenegraph/qsgwindowsrenderloop.cpp @@ -326,6 +326,7 @@ QImage QSGWindowsRenderLoop::grab(QQuickWindow *window) bool alpha = window->format().alphaBufferSize() > 0 && window->color().alpha() != 255; QImage image = qt_gl_read_framebuffer(window->size() * window->effectiveDevicePixelRatio(), alpha, alpha); + image.setDevicePixelRatio(window->effectiveDevicePixelRatio()); return image; } |