diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-10-04 01:00:06 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-10-04 01:00:06 +0200 |
commit | cd526d9ae7bc11be9629255d5db926bbf0c68e59 (patch) | |
tree | 285e8a632705c553aa12fa2cfa5ef054f28dbd43 /src/quick/scenegraph | |
parent | fe2d40b2dcc7905db8aa0bebfaa569f645bd56d1 (diff) | |
parent | bd28fb093c422a802f34a9e8f8a3b031757e8920 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I786d2185e57f6d917507f05b5c9c265341efca68
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp index 1463681fa3..471624d3f8 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp @@ -38,6 +38,7 @@ ****************************************************************************/ #include "qsgsoftwarepublicnodes_p.h" +#include "qsgsoftwarelayer_p.h" #include "qsgsoftwarepixmaptexture_p.h" #include "qsgsoftwareinternalimagenode_p.h" @@ -104,6 +105,9 @@ void QSGSoftwareImageNode::paint(QPainter *painter) } else if (QSGSoftwarePixmapTexture *pt = qobject_cast<QSGSoftwarePixmapTexture *>(m_texture)) { const QPixmap &pm = pt->pixmap(); painter->drawPixmap(m_rect, pm, m_sourceRect); + } else if (QSGSoftwareLayer *pt = qobject_cast<QSGSoftwareLayer *>(m_texture)) { + const QPixmap &pm = pt->pixmap(); + painter->drawPixmap(m_rect, pm, m_sourceRect); } else if (QSGPlainTexture *pt = qobject_cast<QSGPlainTexture *>(m_texture)) { const QImage &im = pt->image(); painter->drawImage(m_rect, im, m_sourceRect); @@ -115,7 +119,6 @@ void QSGSoftwareImageNode::updateCachedMirroredPixmap() if (m_transformMode == NoTransform) { m_cachedPixmap = QPixmap(); } else { - if (QSGSoftwarePixmapTexture *pt = qobject_cast<QSGSoftwarePixmapTexture *>(m_texture)) { QTransform mirrorTransform; if (m_transformMode.testFlag(MirrorVertically)) @@ -123,6 +126,13 @@ void QSGSoftwareImageNode::updateCachedMirroredPixmap() if (m_transformMode.testFlag(MirrorHorizontally)) mirrorTransform = mirrorTransform.scale(-1, 1); m_cachedPixmap = pt->pixmap().transformed(mirrorTransform); + } else if (QSGSoftwareLayer *pt = qobject_cast<QSGSoftwareLayer *>(m_texture)) { + QTransform mirrorTransform; + if (m_transformMode.testFlag(MirrorVertically)) + mirrorTransform = mirrorTransform.scale(1, -1); + if (m_transformMode.testFlag(MirrorHorizontally)) + mirrorTransform = mirrorTransform.scale(-1, 1); + m_cachedPixmap = pt->pixmap().transformed(mirrorTransform); } else if (QSGPlainTexture *pt = qobject_cast<QSGPlainTexture *>(m_texture)) { m_cachedPixmap = QPixmap::fromImage(pt->image().mirrored(m_transformMode.testFlag(MirrorHorizontally), m_transformMode.testFlag(MirrorVertically))); } else { |