diff options
Diffstat (limited to 'src/imports/shapes/qquickshape.cpp')
-rw-r--r-- | src/imports/shapes/qquickshape.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/imports/shapes/qquickshape.cpp b/src/imports/shapes/qquickshape.cpp index c749357cc5..de49baed48 100644 --- a/src/imports/shapes/qquickshape.cpp +++ b/src/imports/shapes/qquickshape.cpp @@ -632,6 +632,7 @@ void QQuickShapePath::resetFillGradient() QQuickShapePrivate::QQuickShapePrivate() : spChanged(false), + effectRefCount(0), rendererType(QQuickShape::UnknownRenderer), async(false), status(QQuickShape::Null), @@ -857,10 +858,12 @@ void QQuickShape::updatePolish() { Q_D(QQuickShape); - if (!d->spChanged) + const int currentEffectRefCount = d->extra.isAllocated() ? d->extra->recursiveEffectRefCount : 0; + if (!d->spChanged && currentEffectRefCount <= d->effectRefCount) return; d->spChanged = false; + d->effectRefCount = currentEffectRefCount; if (!d->renderer) { d->createRenderer(); @@ -872,7 +875,7 @@ void QQuickShape::updatePolish() // endSync() is where expensive calculations may happen (or get kicked off // on worker threads), depending on the backend. Therefore do this only // when the item is visible. - if (isVisible()) + if (isVisible() || d->effectRefCount > 0) d->sync(); update(); |