From 82793cdc229c225494cc7e64d6351321c2442a23 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Sun, 20 Oct 2019 17:35:16 +0200 Subject: Fix broken scaling with high dpi + rhi + thread loop The arguments to renderSceneGraph() were incorrect in the threaded render loop, unlike basic. Fix it up to follow what we do in the basic loop. (The first argument is the QWindow size (logical). The second is only used when rendering via the rhi, and is the output surface/layer size, in pixels. This will get simplified in Qt 6.) This fixes broken rendering with Metal and the threaded render loop for windows with dpr > 1. Change-Id: I427ba5def8cc34900e6fe650e1006ca5f0fa90a4 Reviewed-by: Paul Olav Tvete --- src/quick/scenegraph/qsgthreadedrenderloop.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index 86d9590863..dc1f97de54 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -807,9 +807,7 @@ void QSGRenderThread::syncAndRender(QImage *grabImage) } } if (current) { - const QSize outputSize = rhi ? cd->swapchain->currentPixelSize() : windowSize; - - d->renderSceneGraph(outputSize); + d->renderSceneGraph(windowSize, rhi ? cd->swapchain->currentPixelSize() : QSize()); if (profileFrames) renderTime = threadTimer.nsecsElapsed(); -- cgit v1.2.3