aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-02-15 21:05:45 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-02-15 21:05:45 +0100
commitcf142cd637620e2af6ede46c4f2cefe0206d6159 (patch)
tree10ec6455b795a45152999e74335e5ae7f592903a /src/imports
parent70f35501da4d1bbb36703dcc7b121c454f8d57a9 (diff)
parent238cc098d785b4fe76fbc8422b340d98ff8c1a1b (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/shapes/qquickshape.cpp7
-rw-r--r--src/imports/shapes/qquickshape_p_p.h1
2 files changed, 6 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();
diff --git a/src/imports/shapes/qquickshape_p_p.h b/src/imports/shapes/qquickshape_p_p.h
index c3d84b6353..ef2775885e 100644
--- a/src/imports/shapes/qquickshape_p_p.h
+++ b/src/imports/shapes/qquickshape_p_p.h
@@ -170,6 +170,7 @@ public:
static void asyncShapeReady(void *data);
+ int effectRefCount;
QVector<QQuickShapePath *> sp;
QElapsedTimer syncTimer;
QQuickAbstractPathRenderer *renderer = nullptr;