aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-18 14:52:10 +0200
committerKim M. Kalland <kim.kalland@nokia.com>2011-08-22 12:53:31 +0200
commit94e78b2605a92789caeb4dbe8e7327a6b111a8b0 (patch)
treed5d8484e15924f02c0a301e3f73d01fb33ad37a8 /src
parentf1a9c5e4f4031921f8ae3ec32512bfc9971a97da (diff)
Don't create the scale grid in the rendering thread.
Change-Id: Iee65fe64fa659a6371a05c7ab1c964331fd5605a Reviewed-on: http://codereview.qt.nokia.com/3183 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src')
-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 e4cb535bcd..684ea0097b 100644
--- a/src/declarative/items/qsgborderimage.cpp
+++ b/src/declarative/items/qsgborderimage.cpp
@@ -336,11 +336,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);