aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaprenderer.cpp
diff options
context:
space:
mode:
authorJan Marker <jan.marker@kdab.com>2018-04-08 17:40:36 +0200
committerJan Marker <jan.marker@kdab.com>2018-04-11 14:22:00 +0000
commit10c56615d1418c155648e2a150b45b6cb768b33e (patch)
tree45e177afdd475da8fa1a83462abfed9746f3e752 /src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaprenderer.cpp
parent996c6d452702162e909285b5be9a831290cff1c9 (diff)
Make QSGLayer::grab work correctly in software renderer
Fix three separate issues: 1. It was possible that the QSGSoftwarePixmapRenderer's background image's rectangle was set to a non-normalized rectangle. That would have led to the damage area detection creating an empty QRegion for the damage area and QQuickItem::grabToImage would grab an empty image. 2. The QSGSoftwarePixmapRenderer was rendering the image vertically mirrored compared to what its equivalent in the OpenGL backend was doing. Therefore QSGLayer::grab was vertically mirrored, too, so QQuickItem::grabToImage would grab a mirrored image, too. Additionally QSGSoftwareInternalImageNode (used by QQuickShaderEffectSource) now has to mirror its internal texture if that one is a QSGSoftwareLayer. 3. QSGSoftwareInternalImageNode (used by QQuickShaderEffectSource) was not updating correctly when mirroring (with the fix for 2 also in case of a QSGSoftwareLayer as texture). Related to QTBUG-63185 and QTBUG-65975. Change-Id: I0d0ead7fb1c839a8ff427ff7881d8a881e538409 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaprenderer.cpp')
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaprenderer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaprenderer.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaprenderer.cpp
index 303f98c801..bb4afc8301 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaprenderer.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaprenderer.cpp
@@ -79,7 +79,7 @@ void QSGSoftwarePixmapRenderer::render(QPaintDevice *target)
QElapsedTimer renderTimer;
// Setup background item
- setBackgroundRect(m_projectionRect);
+ setBackgroundRect(m_projectionRect.normalized());
setBackgroundColor(clearColor());
renderTimer.start();