Change-Id: Ia3ab1a75db947a67c610e664051f73bf84b079c1
Reviewed-on: http://codereview.qt-project.org/5008
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
{
Q_OBJECT
public:
- QSGImageTextureProvider(const QSGImage *imageItem)
- : d((QSGImagePrivate *) QSGItemPrivate::get(imageItem))
- , m_texture(0)
+ QSGImageTextureProvider()
+ : m_texture(0)
, m_smooth(false)
{
}
friend class QSGImage;
- QSGImagePrivate *d;
QSGTexture *m_texture;
bool m_smooth;
};
&& QThread::currentThread() == d->sceneGraphContext()->thread(),
"QSGImage::textureProvider",
"Cannot be used outside the GUI thread");
- const_cast<QSGImagePrivate *>(d)->provider = new QSGImageTextureProvider(this);
+ QSGImagePrivate *dd = const_cast<QSGImagePrivate *>(d);
+ dd->provider = new QSGImageTextureProvider;
+ dd->provider->m_texture = d->pix.texture(d->sceneGraphContext());
}
return d->provider;