mirror of
https://github.com/overte-org/overte.git
synced 2025-04-12 18:42:12 +02:00
Only cache processed textures
This commit is contained in:
parent
925ea8bcda
commit
883d4ba006
2 changed files with 4 additions and 0 deletions
|
@ -344,6 +344,7 @@ void NetworkTexture::setImage(const QImage& image, void* voidTexture, int origin
|
|||
_width = _height = 0;
|
||||
}
|
||||
|
||||
_isCacheable = true;
|
||||
finishedLoading(true);
|
||||
|
||||
emit networkTextureCreated(qWeakPointerCast<NetworkTexture, Resource> (_self));
|
||||
|
|
|
@ -132,6 +132,8 @@ signals:
|
|||
|
||||
protected:
|
||||
|
||||
virtual bool isCacheable() const override { return _isCacheable; }
|
||||
|
||||
virtual void downloadFinished(const QByteArray& data) override;
|
||||
|
||||
Q_INVOKABLE void loadContent(const QByteArray& content);
|
||||
|
@ -146,6 +148,7 @@ private:
|
|||
int _originalHeight { 0 };
|
||||
int _width { 0 };
|
||||
int _height { 0 };
|
||||
bool _isCacheable { false };
|
||||
};
|
||||
|
||||
#endif // hifi_TextureCache_h
|
||||
|
|
Loading…
Reference in a new issue