summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/qopengl
diff options
context:
space:
mode:
authorFilipe Azevedo <filipe.azevedo@kdab.com>2016-12-13 16:02:23 +0100
committerFilipe Azevedo <filipe.azevedo@kdab.com>2017-04-09 13:42:34 +0000
commit07bd5a90a3dccaa31940e3b1a78069f55e25405a (patch)
tree3a4183e199f65c4ec0377dd65b59a6970c126e7e /tests/auto/gui/qopengl
parent944bf6867f8360e7ec79f542f65b4ea556ecc4e5 (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: Ic92eee98f691ebb1e0212498c1ae13ede74bca93 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'tests/auto/gui/qopengl')
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index 44921f68aa..4cdd8202e9 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -381,6 +381,7 @@ static bool fuzzyComparePixels(const QRgb testPixel, const QRgb refPixel, const
static void fuzzyCompareImages(const QImage &testImage, const QImage &referenceImage, const char* file, int line)
{
+ QCOMPARE(testImage.devicePixelRatio(), referenceImage.devicePixelRatio());
QCOMPARE(testImage.width(), referenceImage.width());
QCOMPARE(testImage.height(), referenceImage.height());