aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/adaptations
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-21 09:24:03 +0200
committerLiang Qi <liang.qi@qt.io>2016-09-21 09:24:03 +0200
commitcb5cbe9eb7c9a68acbe19ff2fd0c299e30f42eca (patch)
tree2ba783322c213c9c533163dc69c950367f767a44 /src/quick/scenegraph/adaptations
parent8de7ec4bf82c35ff1413fb5f5a5ca1788dc93af3 (diff)
parent16914894f035963ace51c92de13aad11a53c3cf8 (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: src/qml/compiler/qv4isel_moth_p.h Change-Id: I8e86a649d1ef8ad27dc66cc8c290093b2faabc69
Diffstat (limited to 'src/quick/scenegraph/adaptations')
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp
index ae89ed7d8a..cad826fb27 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp
@@ -101,8 +101,13 @@ void QSGSoftwareRenderer::render()
return;
// If there is a backingstore, set the current paint device
- if (m_backingStore)
+ if (m_backingStore) {
+ // For HiDPI QBackingStores, the paint device is not valid
+ // until begin() has been called. See: QTBUG-55875
+ m_backingStore->beginPaint(QRegion());
m_paintDevice = m_backingStore->paintDevice();
+ m_backingStore->endPaint();
+ }
QElapsedTimer renderTimer;
@@ -133,8 +138,12 @@ void QSGSoftwareRenderer::render()
qint64 optimizeRenderListTime = renderTimer.restart();
// If Rendering to a backingstore, prepare it to be updated
- if (m_backingStore != nullptr)
+ if (m_backingStore != nullptr) {
m_backingStore->beginPaint(updateRegion);
+ // It is possible that a QBackingStore's paintDevice() will change
+ // when begin() is called.
+ m_paintDevice = m_backingStore->paintDevice();
+ }
QPainter painter(m_paintDevice);
painter.setRenderHint(QPainter::Antialiasing);