diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-07-14 15:02:44 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-07-14 15:02:44 -0600 |
commit | 493d99c6845a8c93f545424c7b8379fce87ee2fd (patch) | |
tree | 840e5cac81f20c774de2403cbe7de0750e6d5fab /indra/newview | |
parent | 512c9615e513a6e4eda6dff7162b8e30619aac3e (diff) |
EXT-8411: FIXED: load unnecessarily large icon textures.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index b3aff30324..f2a3839f97 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1402,12 +1402,17 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st mUIImages.insert(std::make_pair(name, new_imagep)); mUITextureList.push_back(imagep); - LLUIImageLoadData* datap = new LLUIImageLoadData; - datap->mImageName = name; - datap->mImageScaleRegion = scale_rect; - - imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap, NULL, NULL); + //Note: + //Some other textures such as ICON also through this flow to be fetched. + //But only UI textures need to set this callback. + if(imagep->getBoostLevel() == LLViewerTexture::BOOST_UI) + { + LLUIImageLoadData* datap = new LLUIImageLoadData; + datap->mImageName = name; + datap->mImageScaleRegion = scale_rect; + imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap, NULL, NULL); + } return new_imagep; } |