From 09cb792aa7908bc6c76792ba7ee5082b7569299a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 24 Feb 2016 16:22:38 +0200 Subject: MAINT-5297 - icons were not removed from memory --- indra/newview/llviewertexturelist.cpp | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') 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); -- cgit v1.2.3 From d9545003ed3b4f28d10ccee6939831ff7d74b53f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 25 Mar 2016 17:24:06 +0200 Subject: MAINT-6257 Particle textures loading issues. --- indra/newview/llviewertexturelist.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index e580ecaba1..00338cb884 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -183,7 +183,11 @@ void LLViewerTextureList::doPreloadImages() image->setAddressMode(LLTexUnit::TAM_WRAP); mImagePreloads.insert(image); } - + image = LLViewerTextureManager::getFetchedTextureFromFile("cloud-particle.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_CLOUDS); + if (image) + { + mImagePreloads.insert(image); + } } static std::string get_texture_list_name() -- cgit v1.2.3 From 783cc9756ad6cc07d27bf985171c922aa20b0fc8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Mar 2016 15:17:15 +0300 Subject: Backed out changeset: ca5d40144cc2 --- indra/newview/llviewertexturelist.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 00338cb884..e580ecaba1 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -183,11 +183,7 @@ void LLViewerTextureList::doPreloadImages() image->setAddressMode(LLTexUnit::TAM_WRAP); mImagePreloads.insert(image); } - image = LLViewerTextureManager::getFetchedTextureFromFile("cloud-particle.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_CLOUDS); - if (image) - { - mImagePreloads.insert(image); - } + } static std::string get_texture_list_name() -- cgit v1.2.3 From 0e155c51a95f092dda4f1ee71b4de46c7e98c10d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Mar 2016 18:52:54 +0300 Subject: MAINT-6257 Textures loading issues. --- indra/newview/llviewertexturelist.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index e580ecaba1..4eeb1ca377 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -72,20 +72,14 @@ static LLTrace::BlockTimerStatHandle FTM_PROCESS_IMAGES("Process Images"); ETexListType get_element_type(S32 priority) { - // don't discard flag can be used in some cases, but it usually is not set yet - if (priority == LLViewerFetchedTexture::BOOST_ICON - || priority == LLViewerFetchedTexture::BOOST_UI) - { - return TEX_LIST_UI; - } - return TEX_LIST_DISCARD; + return (priority == LLViewerFetchedTexture::BOOST_ICON) ? TEX_LIST_SCALE : TEX_LIST_STANDARD; } /////////////////////////////////////////////////////////////////////////////// LLTextureKey::LLTextureKey() : textureId(LLUUID::null), -textureType(TEX_LIST_DISCARD) +textureType(TEX_LIST_STANDARD) { } @@ -591,7 +585,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, void LLViewerTextureList::findTexturesByID(const LLUUID &image_id, std::vector &output) { - LLTextureKey search_key(image_id, TEX_LIST_DISCARD); + LLTextureKey search_key(image_id, TEX_LIST_STANDARD); uuid_map_t::iterator iter = mUUIDMap.lower_bound(search_key); while (iter != mUUIDMap.end() && iter->first.textureId == image_id) { @@ -1597,14 +1591,14 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void ** LLUUID image_id; msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id); - LLViewerFetchedTexture* image = gTextureList.findImage( image_id, TEX_LIST_DISCARD); + LLViewerFetchedTexture* image = gTextureList.findImage( image_id, TEX_LIST_STANDARD); if( image ) { LL_WARNS() << "Image not in db" << LL_ENDL; image->setIsMissingAsset(); } - image = gTextureList.findImage(image_id, TEX_LIST_UI); + image = gTextureList.findImage(image_id, TEX_LIST_SCALE); if (image) { LL_WARNS() << "Icon not in db" << LL_ENDL; -- cgit v1.2.3