diff options
author | andreykproductengine <akleshchev@productengine.com> | 2014-05-23 19:05:49 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2014-05-23 19:05:49 +0300 |
commit | ca79d238935b2569194adfabae59dfbff4e5eea4 (patch) | |
tree | 49f2742c70c848ac2d4ef0b34a89eeb7da9e051f /indra | |
parent | 37239340458b3340f50e0748bb28b4cb52e287e2 (diff) |
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.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llavatariconctrl.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llviewertexture.cpp | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 746b541f9d..b89b0d9900 100755 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -247,7 +247,7 @@ void LLAvatarIconCtrl::setValue(const LLSD& value) { LLAvatarPropertiesProcessor* app = LLAvatarPropertiesProcessor::getInstance(); - if (mAvatarId.notNull()) + if (mAvatarId.notNull() && mAvatarId != value.asUUID()) { app->removeObserver(mAvatarId, this); } @@ -255,6 +255,7 @@ void LLAvatarIconCtrl::setValue(const LLSD& value) if (mAvatarId != value.asUUID()) { mAvatarId = value.asUUID(); + app->addObserver(mAvatarId, this); // *BUG: This will return stale icons if a user changes their // profile picture. However, otherwise we send too many upstream @@ -270,7 +271,7 @@ void LLAvatarIconCtrl::setValue(const LLSD& value) // People API, rather than sending AvatarPropertyRequest // messages. People API already hits the user table. LLIconCtrl::setValue(mDefaultIconName); - app->addObserver(mAvatarId, this); + // duplicated requests are filtered later if there are any app->sendAvatarPropertiesRequest(mAvatarId); } } 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); |