aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquickborderimage.cpp8
-rw-r--r--src/quick/items/qquickimage.cpp1
2 files changed, 6 insertions, 3 deletions
diff --git a/src/quick/items/qquickborderimage.cpp b/src/quick/items/qquickborderimage.cpp
index 3cbcf1937f..9fc9752707 100644
--- a/src/quick/items/qquickborderimage.cpp
+++ b/src/quick/items/qquickborderimage.cpp
@@ -560,10 +560,14 @@ QSGNode *QQuickBorderImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDat
QSGImageNode *node = static_cast<QSGImageNode *>(oldNode);
- if (!node)
+ bool updatePixmap = d->pixmapChanged;
+ if (!node) {
node = d->sceneGraphContext()->createImageNode();
+ updatePixmap = true;
+ }
- node->setTexture(texture);
+ if (updatePixmap)
+ node->setTexture(texture);
// Don't implicitly create the scalegrid in the rendering thread...
QRectF innerSourceRect(0, 0, 1, 1);
diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp
index 3a8fd99a66..d6be13f3c0 100644
--- a/src/quick/items/qquickimage.cpp
+++ b/src/quick/items/qquickimage.cpp
@@ -666,7 +666,6 @@ QSGNode *QQuickImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
if (d->pixmapChanged) {
// force update the texture in the node to trigger reconstruction of
// geometry and the likes when a atlas segment has changed.
- node->setTexture(0);
if (texture->isAtlasTexture() && (hWrap == QSGTexture::Repeat || vWrap == QSGTexture::Repeat))
node->setTexture(texture->removedFromAtlas());
else