Showing the changes to interface/src/renderer/TextureCache.cpp (1 of 14 files). Show all
Unified · Split
| @@ -179,15 +179,14 @@ public: · 178 unmodified lines | |||
| 179 | const QByteArray& content; | 179 | const QByteArray& content; |
| 180 | }; | 180 | }; |
| 181 | 181 | ||
| 182 | QSharedPointer<NetworkTexture> TextureCache::getTexture(const QUrl& url, bool normalMap, | 182 | NetworkTexturePointer TextureCache::getTexture(const QUrl& url, bool normalMap, bool dilatable, const QByteArray& content) { |
| 183 | bool dilatable, const QByteArray& content) { | ||
| 184 | if (!dilatable) { | 183 | if (!dilatable) { |
| 185 | TextureExtra extra = { normalMap, content }; | 184 | TextureExtra extra = { normalMap, content }; |
| 186 | return ResourceCache::getResource(url, QUrl(), false, &extra).staticCast<NetworkTexture>(); | 185 | return ResourceCache::getResource(url, QUrl(), false, &extra).staticCast<NetworkTexture>(); |
| 187 | } | 186 | } |
| 188 | QSharedPointer<NetworkTexture> texture = _dilatableNetworkTextures.value(url); | 187 | NetworkTexturePointer texture = _dilatableNetworkTextures.value(url); |
| 189 | if (texture.isNull()) { | 188 | if (texture.isNull()) { |
| 190 | texture = QSharedPointer<NetworkTexture>(new DilatableNetworkTexture(url, content), &Resource::allReferencesCleared); | 189 | texture = NetworkTexturePointer(new DilatableNetworkTexture(url, content), &Resource::allReferencesCleared); |
| 191 | texture->setSelf(texture); | 190 | texture->setSelf(texture); |
| 192 | texture->setCache(this); | 191 | texture->setCache(this); |
| 193 | _dilatableNetworkTextures.insert(url, texture); | 192 | _dilatableNetworkTextures.insert(url, texture); |