aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgborderimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/items/qsgborderimage.cpp')
-rw-r--r--src/declarative/items/qsgborderimage.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/declarative/items/qsgborderimage.cpp b/src/declarative/items/qsgborderimage.cpp
index bd62eaf1bb..30b10321a0 100644
--- a/src/declarative/items/qsgborderimage.cpp
+++ b/src/declarative/items/qsgborderimage.cpp
@@ -582,11 +582,16 @@ QSGNode *QSGBorderImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *
node->setTexture(texture);
- const QSGScaleGrid *border = d->getScaleGrid();
- node->setInnerRect(QRectF(border->left(),
- border->top(),
- qMax(1, d->pix.width() - border->right() - border->left()),
- qMax(1, d->pix.height() - border->bottom() - border->top())));
+ // Don't implicitly create the scalegrid in the rendering thread...
+ if (d->border) {
+ const QSGScaleGrid *border = d->getScaleGrid();
+ node->setInnerRect(QRectF(border->left(),
+ border->top(),
+ qMax(1, d->pix.width() - border->right() - border->left()),
+ qMax(1, d->pix.height() - border->bottom() - border->top())));
+ } else {
+ node->setInnerRect(QRectF(0, 0, width(), height()));
+ }
node->setRect(QRectF(0, 0, width(), height()));
node->setFiltering(d->smooth ? QSGTexture::Linear : QSGTexture::Nearest);
node->setHorzontalTileMode(d->horizontalTileMode);