From ca79d238935b2569194adfabae59dfbff4e5eea4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 23 May 2014 19:05:49 +0300 Subject: MAINT-4018 FIXED Mini profile pictures tend to fail to load fully, and sometimes not at all. Profile icons are no longer discarded uless they are too big. Icons will refresh correctly if needed. --- indra/newview/llviewertexture.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llviewertexture.cpp') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index b83697b2f1..8090b85c0a 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1458,6 +1458,17 @@ void LLViewerFetchedTexture::processTextureStats() { mDesiredDiscardLevel = 0; } + else if (mDontDiscard && (mBoostLevel == LLGLTexture::BOOST_UI || mBoostLevel == LLGLTexture::BOOST_ICON)) + { + if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) + { + mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048 + } + else + { + mDesiredDiscardLevel = 0; + } + } else if(!mFullWidth || !mFullHeight) { mDesiredDiscardLevel = llmin(getMaxDiscardLevel(), (S32)mLoadedCallbackDesiredDiscardLevel); -- cgit v1.2.3