From 5d072dbb583050fe9338ca65e1c2b159c3f77692 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Fri, 14 Jul 2017 12:16:03 +0200 Subject: Software Adaptation: Fix nested clipping logic Task-number: QTBUG-61939 Change-Id: Ibb7f242241df0a7a418ab4f268487e72d5595622 Reviewed-by: Eirik Aavitsland --- .../adaptations/software/qsgsoftwarerenderablenodeupdater.cpp | 4 ++-- 1 file 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; } -- cgit v1.2.3