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 da5a525ff0..f0fdebe162 100644 --- a/src/imports/shapes/qquickshape.cpp +++ b/src/imports/shapes/qquickshape.cpp @@ -633,6 +633,7 @@ void QQuickShapePath::resetFillGradient() */ QQuickShapePrivate::QQuickShapePrivate() + : effectRefCount(0) { } @@ -910,10 +911,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(); @@ -925,7 +928,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(); |