aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2019-06-17 12:39:58 +0200
committerMorten Johan Sørvig <morten.sorvig@qt.io>2019-06-17 12:51:37 +0200
commit850d037bd455f2d96b22825756ce136bbd681a6c (patch)
tree6f93812c06f65e8a5a2337540eb8e27e12b8933e /src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
parentbef922b9b6bda99d2300e05dde75892fadde2edc (diff)
Software Adaptation: Invalidate on dpr change
We need to repaint everything on devicePixelRatio change, like we do on size change. Task-number: QTBUG-66810 Change-Id: I6b2c2ae92335a0aca731a4b0e7621cf7d08881e3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp')
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp b/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
index 2e5fdbbe6b..af3b901af4 100644
--- a/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
@@ -238,12 +238,13 @@ void QSGAbstractSoftwareRenderer::setBackgroundColor(const QColor &color)
renderableNode(m_background)->markMaterialDirty();
}
-void QSGAbstractSoftwareRenderer::setBackgroundRect(const QRect &rect)
+void QSGAbstractSoftwareRenderer::setBackgroundRect(const QRect &rect, qreal devicePixelRatio)
{
- if (m_background->rect().toRect() == rect)
+ if (m_background->rect().toRect() == rect && m_devicePixelRatio == devicePixelRatio)
return;
m_background->setRect(rect);
- renderableNode(m_background)->markGeometryDirty();
+ m_devicePixelRatio = devicePixelRatio;
+ renderableNode(m_background)->markGeometryDirty();
// Invalidate the whole scene when the background is resized
markDirty();
}