aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/shapes
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-02-12 13:26:55 +0100
committerLiang Qi <liang.qi@qt.io>2018-02-12 16:31:13 +0100
commit4d525de33e2ee55e69bb6c90fc11049a0f8b36b5 (patch)
treec9808baeabb1121f488a7b59ffff314cc62d80e8 /src/imports/shapes
parent47cd9da96371ccd495f6caabe1c6853258210ebb (diff)
parent3e3c6717ba634825a65069541500c40645a808ee (diff)
Merge remote-tracking branch 'origin/5.10' into 5.11
Conflicts: src/imports/shapes/qquickshape.cpp src/imports/shapes/qquickshape_p_p.h src/qml/compiler/qqmlpropertycachecreator_p.h src/qml/jsruntime/qv4value_p.h src/quick/items/qquickloader_p.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tools/qmlprofiler/qmlprofilerapplication.cpp Change-Id: Iafc66ae84bf78630ed72a986acb678e9d19e3a69
Diffstat (limited to 'src/imports/shapes')
-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;