diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-10-05 23:19:24 +0300 |
|---|---|---|
| committer | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-10-09 19:45:09 +0300 |
| commit | c1c5275f20b48dee6c5477a9e1eb76fad3d5e789 (patch) | |
| tree | f9a2372dabd204156c7d572a6ffe339daaa082bc /indra/newview/llviewertexturelist.cpp | |
| parent | 683e96ed61692d26b3eba2b08fe9978de998cb41 (diff) | |
SL-20411 Thumbnail textures should have less of an impact on performance #1
scale thumbnail textures down to 256 when needed. As we do to chat icons.
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
| -rw-r--r-- | indra/newview/llviewertexturelist.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 0d34160bda..7935adb3e2 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -71,7 +71,7 @@ LLViewerTextureList gTextureList; ETexListType get_element_type(S32 priority) { - return (priority == LLViewerFetchedTexture::BOOST_ICON) ? TEX_LIST_SCALE : TEX_LIST_STANDARD; + return (priority == LLViewerFetchedTexture::BOOST_ICON || priority == LLViewerFetchedTexture::BOOST_THUMBNAIL) ? TEX_LIST_SCALE : TEX_LIST_STANDARD; } /////////////////////////////////////////////////////////////////////////////// @@ -498,7 +498,8 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& { imagep->dontDiscard(); } - if (boost_priority == LLViewerFetchedTexture::BOOST_ICON) + if (boost_priority == LLViewerFetchedTexture::BOOST_ICON + || boost_priority == LLViewerFetchedTexture::BOOST_THUMBNAIL) { // Agent and group Icons are downloadable content, nothing manages // icon deletion yet, so they should not persist @@ -615,7 +616,8 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, { imagep->dontDiscard(); } - if (boost_priority == LLViewerFetchedTexture::BOOST_ICON) + if (boost_priority == LLViewerFetchedTexture::BOOST_ICON + || boost_priority == LLViewerFetchedTexture::BOOST_THUMBNAIL) { // Agent and group Icons are downloadable content, nothing manages // icon deletion yet, so they should not persist. @@ -1696,8 +1698,9 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st LLUIImagePtr new_imagep = new LLUIImage(name, imagep); new_imagep->setScaleStyle(scale_style); - if (imagep->getBoostLevel() != LLGLTexture::BOOST_ICON && - imagep->getBoostLevel() != LLGLTexture::BOOST_PREVIEW) + if (imagep->getBoostLevel() != LLGLTexture::BOOST_ICON + && imagep->getBoostLevel() != LLGLTexture::BOOST_THUMBNAIL + && imagep->getBoostLevel() != LLGLTexture::BOOST_PREVIEW) { // Don't add downloadable content into this list // all UI images are non-deletable and list does not support deletion |
