QDeclarativePixmap::clear() may result in the texture being
scheduled for deletion, so we need to make sure that our texture
provider is updated properly whenever the source changes.
Change-Id: Ie21c6fcba4b0cd438250dc4c263b513060cc026e
Reviewed-on: http://codereview.qt-project.org/5673
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
QSGImageBase::pixmapChange();
updatePaintedGeometry();
d->pixmapChanged = true;
+
+ // Make sure we update the texture provider when the image has changed.
+ if (d->provider)
+ update();
}
QSGImage::VAlignment QSGImage::verticalAlignment() const
if (d->cache)
options |= QDeclarativePixmap::Cache;
d->pix.clear(this);
+ pixmapChange();
d->pix.load(qmlEngine(this), d->url, d->explicitSourceSize ? sourceSize() : QSize(), options);
if (d->pix.isLoading()) {