summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturecache.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-06-26 09:45:14 -0400
committerNat Goodspeed <nat@lindenlab.com>2018-06-26 09:45:14 -0400
commitf4a772b2b8e70eb3ef3b734a7d3e1623e3f1be15 (patch)
treecc1759aeb34319f3af32085a7fc778fca7eda92d /indra/newview/lltexturecache.cpp
parent020757ff0170aa894c56cd719d46413c9e99fde6 (diff)
parent9db683c13e67575bd347cf8a795f1a4ee148c4ea (diff)
DRTVWR-453: Update from MAINT (viewer-lynx).
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-rw-r--r--indra/newview/lltexturecache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 2a0d961952..dd5dce3279 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -2027,13 +2027,15 @@ 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->scaled(w, h);
+ raw = raw->duplicate();
if (raw->isBufferInvalid())
{
LL_WARNS() << "Invalid image duplicate buffer" << LL_ENDL;
return false;
}
+ raw->scale(w, h);
+
discardlevel += i ;
}
}