summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-02-18 17:35:43 +0200
committerandreykproductengine <akleshchev@productengine.com>2016-02-18 17:35:43 +0200
commit10e2bd56c1722526d14656aa6870a23b86f51333 (patch)
tree97069a5b180135ff945bf927f98282319b05c5cc /indra/newview/llviewertexture.cpp
parenta0e9ee475758c1825ba4a0957f4047e1dc24c8a3 (diff)
MAINT-2199 In some rare cases priorities can change, it shouldn't affect texture list.
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rwxr-xr-xindra/newview/llviewertexture.cpp29
1 files changed, 11 insertions, 18 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 50d9467b4a..e2b8ff8e80 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -131,7 +131,7 @@ LLLoadedCallbackEntry::LLLoadedCallbackEntry(loaded_callback_func cb,
{
if(mSourceCallbackList)
{
- mSourceCallbackList->insert(LLTextureKey(target->getID(), target->isUITexture()));
+ mSourceCallbackList->insert(LLTextureKey(target->getID(), (ETexListType)target->getTextureListType()));
}
}
@@ -143,7 +143,7 @@ void LLLoadedCallbackEntry::removeTexture(LLViewerFetchedTexture* tex)
{
if(mSourceCallbackList)
{
- mSourceCallbackList->erase(LLTextureKey(tex->getID(), tex->isUITexture()));
+ mSourceCallbackList->erase(LLTextureKey(tex->getID(), (ETexListType)tex->getTextureListType()));
}
}
@@ -200,9 +200,9 @@ void LLViewerTextureManager::findTextures(const LLUUID& id, std::vector<LLViewe
}
-LLViewerFetchedTexture* LLViewerTextureManager::findFetchedTexture(const LLUUID& id, bool is_ui)
+LLViewerFetchedTexture* LLViewerTextureManager::findFetchedTexture(const LLUUID& id, S32 tex_type)
{
- return gTextureList.findImage(id, is_ui);
+ return gTextureList.findImage(id, (ETexListType)tex_type);
}
LLViewerMediaTexture* LLViewerTextureManager::findMediaTexture(const LLUUID &media_id)
@@ -729,13 +729,6 @@ void LLViewerTexture::setBoostLevel(S32 level)
}
-bool LLViewerTexture::isUITexture()
-{
- // can be substituted with mDontDiscard
- return mBoostLevel == LLViewerTexture::BOOST_ICON
- || mBoostLevel == LLViewerTexture::BOOST_UI;
-}
-
bool LLViewerTexture::isActiveFetching()
{
return false;
@@ -3329,7 +3322,7 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL
setCategory(LLGLTexture::MEDIA);
- LLViewerTexture* tex = gTextureList.findImage(mID, false);
+ LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
if(tex) //this media is a parcel media for tex.
{
tex->setParcelMedia(this);
@@ -3339,7 +3332,7 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL
//virtual
LLViewerMediaTexture::~LLViewerMediaTexture()
{
- LLViewerTexture* tex = gTextureList.findImage(mID, false);
+ LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
if(tex) //this media is a parcel media for tex.
{
tex->setParcelMedia(NULL);
@@ -3394,7 +3387,7 @@ BOOL LLViewerMediaTexture::findFaces()
BOOL ret = TRUE;
- LLViewerTexture* tex = gTextureList.findImage(mID, false);
+ LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
if(tex) //this media is a parcel media for tex.
{
for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
@@ -3503,7 +3496,7 @@ void LLViewerMediaTexture::addFace(U32 ch, LLFace* facep)
const LLTextureEntry* te = facep->getTextureEntry();
if(te && te->getID().notNull())
{
- LLViewerTexture* tex = gTextureList.findImage(te->getID(), false);
+ LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_DISCARD);
if(tex)
{
mTextureList.push_back(tex);//increase the reference number by one for tex to avoid deleting it.
@@ -3532,7 +3525,7 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep)
const LLTextureEntry* te = facep->getTextureEntry();
if(te && te->getID().notNull())
{
- LLViewerTexture* tex = gTextureList.findImage(te->getID(), false);
+ LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_DISCARD);
if(tex)
{
for(std::list< LLPointer<LLViewerTexture> >::iterator iter = mTextureList.begin();
@@ -3641,10 +3634,10 @@ void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep)
const LLTextureEntry* te = facep->getTextureEntry();
if(te)
{
- LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), false) : NULL;
+ LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_DISCARD) : NULL;
if(!tex && te->getID() != mID)//try parcel media.
{
- tex = gTextureList.findImage(mID, false);
+ tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
}
if(!tex)
{