summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
authorNyx Linden <nyx@lindenlab.com>2013-01-24 16:22:49 -0500
committerNyx Linden <nyx@lindenlab.com>2013-01-24 16:22:49 -0500
commit11fe124ae96721b0d0f960732e8628fe0e2f84c4 (patch)
treea8525988388de004be72251c0d7783a61d314888 /indra/newview/llviewertexturelist.cpp
parentcebde0a32b4a8163010d9cbf5e6b3036865ed943 (diff)
parentb40fad02de170b5da179cacc22f32f5f25ffd7cb (diff)
merging in viewer-beta.
Most of the merge was clean, a couple conflicts. Brought over a couple patches manually for llpolymesh.
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewertexturelist.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index b9f5c432d0..a65a90b9ab 100644..100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -198,7 +198,7 @@ void LLViewerTextureList::doPrefetchImages()
if(LLViewerTexture::FETCHED_TEXTURE == texture_type || LLViewerTexture::LOD_TEXTURE == texture_type)
{
- LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, texture_type);
+ LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, texture_type);
if (image)
{
image->addTextureStats((F32)pixel_area);
@@ -228,7 +228,9 @@ void LLViewerTextureList::shutdown()
if (!image->hasGLTexture() ||
!image->getUseDiscard() ||
image->needsAux() ||
- image->getTargetHost() != LLHost::invalid)
+ image->getTargetHost() != LLHost::invalid ||
+ !image->getUrl().empty()
+ )
{
continue; // avoid UI, baked, and other special images
}
@@ -339,7 +341,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
if (full_path.empty())
{
llwarns << "Failed to find local image file: " << filename << llendl;
- return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI);
+ return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
}
std::string url = "file://" + full_path;
@@ -430,7 +432,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
if ((&image_id == NULL) || image_id.isNull())
{
- return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI));
+ return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI));
}
LLPointer<LLViewerFetchedTexture> imagep = findImage(image_id);
@@ -1353,7 +1355,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
U8 *data = new U8[data_size];
msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size);
- LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
if (!image)
{
delete [] data;
@@ -1425,7 +1427,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
U8 *data = new U8[data_size];
msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size);
- LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
if (!image)
{
delete [] data;
@@ -1525,9 +1527,9 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priori
LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename,
BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority )
{
- if (boost_priority == LLViewerTexture::BOOST_NONE)
+ if (boost_priority == LLGLTexture::BOOST_NONE)
{
- boost_priority = LLViewerTexture::BOOST_UI;
+ boost_priority = LLGLTexture::BOOST_UI;
}
LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, boost_priority);
return loadUIImage(imagep, name, use_mips, scale_rect, clip_rect);
@@ -1536,9 +1538,9 @@ LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std
LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id,
BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority)
{
- if (boost_priority == LLViewerTexture::BOOST_NONE)
+ if (boost_priority == LLGLTexture::BOOST_NONE)
{
- boost_priority = LLViewerTexture::BOOST_UI;
+ boost_priority = LLGLTexture::BOOST_UI;
}
LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, boost_priority);
return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect);
@@ -1563,7 +1565,7 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
//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)
+ if(imagep->getBoostLevel() == LLGLTexture::BOOST_UI)
{
LLUIImageLoadData* datap = new LLUIImageLoadData;
datap->mImageName = name;