From 1518bc9f9add7812f0fa1f60d58c6b8f0ee462ca Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 30 Jan 2013 18:43:30 -0500 Subject: SH-3800 WIP - avoid complaints about source of various standard textures - IMG_DEFAULT_AVATAR etc --- indra/newview/llvoavatar.cpp | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'indra') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f0986ac223..5b4f31f91a 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1778,21 +1778,32 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUUID& uuid) { - LLViewerFetchedTexture *result; - - const std::string url = getImageURL(te,uuid); - if (!url.empty()) + LLViewerFetchedTexture *result = NULL; + + if (uuid == IMG_DEFAULT_AVATAR || + uuid == IMG_DEFAULT || + uuid == IMG_INVISIBLE) { - llinfos << "texture URL " << url << llendl; - result = LLViewerTextureManager::getFetchedTextureFromUrl( - url, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid); + // Should already exist, don't need to find it on sim or baked-texture host. + result = gTextureList.findImage(uuid); } - else + + if (!result) { - llinfos << "get texture from host " << uuid << llendl; - LLHost host = getObjectHost(); - result = LLViewerTextureManager::getFetchedTexture( - uuid, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); + const std::string url = getImageURL(te,uuid); + if (!url.empty()) + { + llinfos << "texture URL " << url << llendl; + result = LLViewerTextureManager::getFetchedTextureFromUrl( + url, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid); + } + else + { + llinfos << "get texture from host " << uuid << llendl; + LLHost host = getObjectHost(); + result = LLViewerTextureManager::getFetchedTexture( + uuid, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); + } } return result; } -- cgit v1.2.3