From 6dcde6469d03b96260b1d00c22a90d76357a28ae Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 6 Jun 2017 15:30:03 +0300 Subject: [SL-711] - Eliminate some overheads in texturecache. - Eliminate memory overhead when need duplicated scaled image. - Small improvement in LLImageBase::getCodecFromExtension() --- indra/newview/llviewertexture.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewertexture.cpp') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 5de7df7b91..e5a1bed48c 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1396,8 +1396,7 @@ void LLViewerFetchedTexture::addToCreateTexture() { //make a duplicate in case somebody else is using this raw image - mRawImage = mRawImage->duplicate(); - mRawImage->scale(w >> i, h >> i) ; + mRawImage = mRawImage->scaled(w >> i, h >> i); } } } @@ -2913,8 +2912,7 @@ void LLViewerFetchedTexture::setCachedRawImage() { //make a duplicate in case somebody else is using this raw image - mRawImage = mRawImage->duplicate(); - mRawImage->scale(w >> i, h >> i) ; + mRawImage = mRawImage->scaled(w >> i, h >> i); } } mCachedRawImage = mRawImage; -- cgit v1.2.3