Clean image-reader to drop image sooner

This commit is contained in:
Zach Pomerantz 2016-03-24 15:50:48 -07:00
parent caf2595e13
commit 8d0e419a5c
2 changed files with 2 additions and 3 deletions

View file

@ -320,13 +320,12 @@ void ImageReader::run() {
} }
QMetaObject::invokeMethod(texture.data(), "setImage", QMetaObject::invokeMethod(texture.data(), "setImage",
Q_ARG(const QImage&, image),
Q_ARG(void*, theTexture), Q_ARG(void*, theTexture),
Q_ARG(int, originalWidth), Q_ARG(int, originalHeight)); Q_ARG(int, originalWidth), Q_ARG(int, originalHeight));
QThread::currentThread()->setPriority(originalPriority); QThread::currentThread()->setPriority(originalPriority);
} }
void NetworkTexture::setImage(const QImage& image, void* voidTexture, int originalWidth, void NetworkTexture::setImage(void* voidTexture, int originalWidth,
int originalHeight) { int originalHeight) {
_originalWidth = originalWidth; _originalWidth = originalWidth;
_originalHeight = originalHeight; _originalHeight = originalHeight;

View file

@ -136,7 +136,7 @@ protected:
Q_INVOKABLE void loadContent(const QByteArray& content); Q_INVOKABLE void loadContent(const QByteArray& content);
// FIXME: This void* should be a gpu::Texture* but i cannot get it to work for now, moving on... // FIXME: This void* should be a gpu::Texture* but i cannot get it to work for now, moving on...
Q_INVOKABLE void setImage(const QImage& image, void* texture, int originalWidth, int originalHeight); Q_INVOKABLE void setImage(void* texture, int originalWidth, int originalHeight);
private: private: