summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturecache.cpp
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2017-06-06 15:30:03 +0300
committerruslantproductengine <ruslantproductengine@lindenlab.com>2017-06-06 15:30:03 +0300
commit6dcde6469d03b96260b1d00c22a90d76357a28ae (patch)
treeb4aff1735a898df7726c16a11e43bbaed1aaa947 /indra/newview/lltexturecache.cpp
parent3f072ceca06d134727cb1d4ee04779816a5c9604 (diff)
[SL-711] - Eliminate some overheads in texturecache.
- Eliminate memory overhead when need duplicated scaled image. - Small improvement in LLImageBase::getCodecFromExtension()
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-rw-r--r--indra/newview/lltexturecache.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index e8b3842ae5..f0c28041d1 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1987,15 +1987,13 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
if(w * h *c > 0) //valid
{
//make a duplicate to keep the original raw image untouched.
- raw = raw->duplicate();
+ raw = raw->scaled(w, h);
if (raw->isBufferInvalid())
{
LL_WARNS() << "Invalid image duplicate buffer" << LL_ENDL;
return false;
}
- raw->scale(w, h) ;
-
discardlevel += i ;
}
}