diff options
author | Andy Nichols <andy.nichols@qt.io> | 2017-07-14 12:16:03 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2017-07-17 07:54:21 +0000 |
commit | 5d072dbb583050fe9338ca65e1c2b159c3f77692 (patch) | |
tree | d31ea60b6245222819c7f058c2ac5a396f1270b9 /src/quick | |
parent | 86cf1f0d919549420b39016ac27ffdb0cd690dd0 (diff) |
Software Adaptation: Fix nested clipping logic
Task-number: QTBUG-61939
Change-Id: Ibb7f242241df0a7a418ab4f268487e72d5595622
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp index 4937565aa9..666f1d0616 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp @@ -83,7 +83,7 @@ void QSGSoftwareRenderableNodeUpdater::endVisit(QSGTransformNode *) bool QSGSoftwareRenderableNodeUpdater::visit(QSGClipNode *node) { // Make sure to translate the clip rect into world coordinates - if (m_clipState.count() == 1) { + if (m_clipState.count() == 0 || m_clipState.top().isNull()) { m_clipState.push(m_transformState.top().map(QRegion(node->clipRect().toRect()))); m_hasClip = true; } else { @@ -97,7 +97,7 @@ bool QSGSoftwareRenderableNodeUpdater::visit(QSGClipNode *node) void QSGSoftwareRenderableNodeUpdater::endVisit(QSGClipNode *) { m_clipState.pop(); - if (m_clipState.count() == 1) + if (m_clipState.count() == 0 || m_clipState.top().isNull()) m_hasClip = false; } |