aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-09-03 13:26:17 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-04 22:16:10 +0000
commit546464085b58a8da7a5bef0eb84d9961cfe3b3b0 (patch)
treefa1c9d4e5c5e41475f87eba7c1b740aeff026bc4 /src
parent0de5ab3fa972901bb3f2c3d4d102b52fee77e28e (diff)
Update the QRhiTexture size in QSGPlainTexture
An autotest is added separately for dev only because the necessary infrastructure for sophisticated scenegraph tests only exists there due to some earlier commits that are in dev and not in 6.2. Fixes: QTBUG-96190 Change-Id: Ie2adee96864b60f982a83b9b2785a93d5401bd6a Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 4de27382f9b5f05b8d5821247ea7653b44264c03) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/quick/scenegraph/util/qsgplaintexture.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quick/scenegraph/util/qsgplaintexture.cpp b/src/quick/scenegraph/util/qsgplaintexture.cpp
index 6e59f9e607..ad6bfd450d 100644
--- a/src/quick/scenegraph/util/qsgplaintexture.cpp
+++ b/src/quick/scenegraph/util/qsgplaintexture.cpp
@@ -231,7 +231,12 @@ void QSGPlainTexture::commitTextureOperations(QRhi *rhi, QRhiResourceUpdateBatch
}
}
- bool needsRebuild = m_texture && m_texture->pixelSize() != m_texture_size;
+ bool needsRebuild = false;
+
+ if (m_texture && m_texture->pixelSize() != m_texture_size) {
+ m_texture->setPixelSize(m_texture_size);
+ needsRebuild = true;
+ }
if (mipmappingChanged) {
QRhiTexture::Flags f = m_texture->flags();