summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-02-24 16:22:38 +0200
committerandreykproductengine <akleshchev@productengine.com>2016-02-24 16:22:38 +0200
commit09cb792aa7908bc6c76792ba7ee5082b7569299a (patch)
tree05efa1e7e59dabf740172d73577f9635c0074104 /indra/newview/llviewertexturelist.cpp
parentc27f2e19125c469bd0cbddd8c2a8feac66dc8b9a (diff)
MAINT-5297 - icons were not removed from memory
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rwxr-xr-xindra/newview/llviewertexturelist.cpp27
1 files changed, 21 insertions, 6 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index a8c93646c6..ca0565fa4b 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -450,11 +450,17 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
if (boost_priority != 0)
{
- if (boost_priority == LLViewerFetchedTexture::BOOST_UI
- || boost_priority == LLViewerFetchedTexture::BOOST_ICON)
+ if (boost_priority == LLViewerFetchedTexture::BOOST_UI)
{
imagep->dontDiscard();
}
+ if (boost_priority == LLViewerFetchedTexture::BOOST_ICON)
+ {
+ // Agent and group Icons are downloadable content, nothing manages
+ // icon deletion yet, so they should not persist
+ imagep->dontDiscard();
+ imagep->forceActive();
+ }
imagep->setBoostLevel(boost_priority);
}
}
@@ -554,10 +560,16 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
if (boost_priority != 0)
{
- if (boost_priority == LLViewerFetchedTexture::BOOST_UI
- || boost_priority == LLViewerFetchedTexture::BOOST_ICON)
+ if (boost_priority == LLViewerFetchedTexture::BOOST_UI)
+ {
+ imagep->dontDiscard();
+ }
+ if (boost_priority == LLViewerFetchedTexture::BOOST_ICON)
{
+ // Agent and group Icons are downloadable content, nothing manages
+ // icon deletion yet, so they should not persist.
imagep->dontDiscard();
+ imagep->forceActive();
}
imagep->setBoostLevel(boost_priority);
}
@@ -1679,8 +1691,11 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
//don't compress UI images
imagep->getGLTexture()->setAllowCompression(false);
- //all UI images are non-deletable
- imagep->setNoDelete();
+ //all UI images are non-deletable, except downloadable icons
+ if (imagep->getBoostLevel() != LLGLTexture::BOOST_ICON)
+ {
+ imagep->setNoDelete();
+ }
LLUIImagePtr new_imagep = new LLUIImage(name, imagep);
new_imagep->setScaleStyle(scale_style);