summaryrefslogtreecommitdiffstats
path: root/src/plugins/renderers/opengl/graphicshelpers
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2020-05-29 14:31:35 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-05-29 17:27:28 +0000
commit83ee10ff799fa5892b14a677036fb445ae16b10b (patch)
tree74a787ebde01569dbe212ce6f95215d38323a189 /src/plugins/renderers/opengl/graphicshelpers
parent628e3a54126425fe4d1093641fe4f6efbb35b623 (diff)
Use surfaceSize as this will always be valid
This fixes an issue when resizing a Scene3D that is inside a QQuickWidget to ensure that it has something rendered in each frame. Fixes: QTBUG-83095 Change-Id: Ic6c8b1b2efd0757f9f88768aafb331c4c1a1f9f2 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 2e3607aa120324f60832ca1cd42aaeaf22cc148d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/plugins/renderers/opengl/graphicshelpers')
-rw-r--r--src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp
index 34f31f23f..86f0af505 100644
--- a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp
+++ b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp
@@ -604,7 +604,7 @@ QSize SubmissionContext::renderTargetSize(const QSize &surfaceSize) const
return renderTargetSize;
}
} else {
- renderTargetSize = m_surface->size();
+ renderTargetSize = surfaceSize;
if (m_surface->surfaceClass() == QSurface::Window) {
const float dpr = static_cast<QWindow *>(m_surface)->devicePixelRatio();
renderTargetSize *= dpr;