summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rwxr-xr-xindra/newview/llviewertexturelist.cpp81
1 files changed, 40 insertions, 41 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index dfd7ac983d..9b89ee2ec9 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -30,7 +30,6 @@
#include "llviewertexturelist.h"
-#include "imageids.h"
#include "llgl.h" // fot gathering stats from GL
#include "llimagegl.h"
#include "llimagebmp.h"
@@ -285,18 +284,18 @@ void LLViewerTextureList::shutdown()
void LLViewerTextureList::dump()
{
- llinfos << "LLViewerTextureList::dump()" << llendl;
+ LL_INFOS() << "LLViewerTextureList::dump()" << LL_ENDL;
for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it)
{
LLViewerFetchedTexture* image = *it;
- llinfos << "priority " << image->getDecodePriority()
+ LL_INFOS() << "priority " << image->getDecodePriority()
<< " boost " << image->getBoostLevel()
<< " size " << image->getWidth() << "x" << image->getHeight()
<< " discard " << image->getDiscardLevel()
<< " desired " << image->getDesiredDiscardLevel()
<< " http://asset.siva.lindenlab.com/" << image->getID() << ".texture"
- << llendl;
+ << LL_ENDL;
}
}
@@ -337,7 +336,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
if (full_path.empty())
{
- llwarns << "Failed to find local image file: " << filename << llendl;
+ llwarns << "Failed to find local image file: " << filename << LL_ENDL;
return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
}
@@ -378,7 +377,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
LLViewerFetchedTexture *texture = imagep.get();
if (texture->getUrl().empty())
{
- llwarns << "Requested texture " << new_id << " already exists but does not have a URL" << llendl;
+ llwarns << "Requested texture " << new_id << " already exists but does not have a URL" << LL_ENDL;
}
else if (texture->getUrl() != url)
{
@@ -386,7 +385,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
// e.g. could be two avatars wearing the same outfit.
LL_DEBUGS("Avatar") << "Requested texture " << new_id
<< " already exists with a different url, requested: " << url
- << " current: " << texture->getUrl() << llendl;
+ << " current: " << texture->getUrl() << LL_ENDL;
}
}
@@ -401,7 +400,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
imagep = new LLViewerLODTexture(url, f_type, new_id, usemipmaps);
break ;
default:
- llerrs << "Invalid texture type " << texture_type << llendl ;
+ LL_ERRS() << "Invalid texture type " << texture_type << LL_ENDL ;
}
if (internal_format && primary_format)
@@ -458,18 +457,18 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
if (request_from_host.isOk() &&
!texture->getTargetHost().isOk())
{
- llwarns << "Requested texture " << image_id << " already exists but does not have a host" << llendl;
+ llwarns << "Requested texture " << image_id << " already exists but does not have a host" << LL_ENDL;
}
else if (request_from_host.isOk() &&
texture->getTargetHost().isOk() &&
request_from_host != texture->getTargetHost())
{
llwarns << "Requested texture " << image_id << " already exists with a different target host, requested: "
- << request_from_host << " current: " << texture->getTargetHost() << llendl;
+ << request_from_host << " current: " << texture->getTargetHost() << LL_ENDL;
}
if (f_type != FTT_DEFAULT && imagep->getFTType() != f_type)
{
- llwarns << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << llendl;
+ llwarns << "FTType mismatch: requested " << f_type << " image has " << imagep->getFTType() << LL_ENDL;
}
}
@@ -505,7 +504,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
imagep = new LLViewerLODTexture(image_id, f_type, request_from_host, usemipmaps);
break ;
default:
- llerrs << "Invalid texture type " << texture_type << llendl ;
+ LL_ERRS() << "Invalid texture type " << texture_type << LL_ENDL ;
}
if (internal_format && primary_format)
@@ -555,11 +554,11 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
llassert(image);
if (image->isInImageList())
{
- llerrs << "LLViewerTextureList::addImageToList - Image already in list" << llendl;
+ LL_ERRS() << "LLViewerTextureList::addImageToList - Image already in list" << LL_ENDL;
}
if((mImageList.insert(image)).second != true)
{
- llerrs << "Error happens when insert image to mImageList!" << llendl ;
+ LL_ERRS() << "Error happens when insert image to mImageList!" << LL_ENDL ;
}
image->setInImageList(TRUE) ;
@@ -572,20 +571,20 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
llassert(image);
if (!image->isInImageList())
{
- llinfos << "RefCount: " << image->getNumRefs() << llendl ;
+ LL_INFOS() << "RefCount: " << image->getNumRefs() << LL_ENDL ;
uuid_map_t::iterator iter = mUUIDMap.find(image->getID());
if(iter == mUUIDMap.end() || iter->second != image)
{
- llinfos << "Image is not in mUUIDMap!" << llendl ;
+ LL_INFOS() << "Image is not in mUUIDMap!" << LL_ENDL ;
}
- llerrs << "LLViewerTextureList::removeImageFromList - Image not in list" << llendl;
+ LL_ERRS() << "LLViewerTextureList::removeImageFromList - Image not in list" << LL_ENDL;
}
S32 count = mImageList.erase(image) ;
if(count != 1)
{
- llinfos << image->getID() << llendl ;
- llerrs << "Error happens when remove image from mImageList: " << count << llendl ;
+ LL_INFOS() << image->getID() << LL_ENDL ;
+ LL_ERRS() << "Error happens when remove image from mImageList: " << count << LL_ENDL ;
}
image->setInImageList(FALSE) ;
@@ -595,7 +594,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image)
{
if (!new_image)
{
- llwarning("No image to add to image list", 0);
+ LL_WARNS() << "No image to add to image list" << LL_ENDL;
return;
}
LLUUID image_id = new_image->getID();
@@ -603,7 +602,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image)
LLViewerFetchedTexture *image = findImage(image_id);
if (image)
{
- llwarns << "Image with ID " << image_id << " already in list" << llendl;
+ LL_WARNS() << "Image with ID " << image_id << " already in list" << LL_ENDL;
}
sNumImages++;
@@ -901,7 +900,7 @@ void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debu
<< " host " << target_host
<< " boost " << imagep->getBoostLevel()
<< " imageid " << imagep->getID()
- << llendl;
+ << LL_ENDL;
imagep->dump();
}
return type_from_host;
@@ -1175,13 +1174,13 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
if (compressedImage.isNull())
{
image->setLastError("Couldn't convert the image to jpeg2000.");
- llinfos << "Couldn't convert to j2c, file : " << filename << llendl;
+ LL_INFOS() << "Couldn't convert to j2c, file : " << filename << LL_ENDL;
return FALSE;
}
if (!compressedImage->save(out_filename))
{
image->setLastError("Couldn't create the jpeg2000 image for upload.");
- llinfos << "Couldn't create output file : " << out_filename << llendl;
+ LL_INFOS() << "Couldn't create output file : " << out_filename << LL_ENDL;
return FALSE;
}
// Test to see if the encode and save worked
@@ -1189,7 +1188,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
if (!integrity_test->loadAndValidate( out_filename ))
{
image->setLastError("The created jpeg2000 image is corrupt.");
- llinfos << "Image file : " << out_filename << " is corrupt" << llendl;
+ LL_INFOS() << "Image file : " << out_filename << " is corrupt" << LL_ENDL;
return FALSE;
}
return TRUE;
@@ -1214,13 +1213,13 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage
// Read the blocks and precincts size settings
S32 block_size = gSavedSettings.getS32("Jpeg2000BlocksSize");
S32 precinct_size = gSavedSettings.getS32("Jpeg2000PrecinctsSize");
- llinfos << "Advanced JPEG2000 Compression: precinct = " << precinct_size << ", block = " << block_size << llendl;
+ LL_INFOS() << "Advanced JPEG2000 Compression: precinct = " << precinct_size << ", block = " << block_size << LL_ENDL;
compressedImage->initEncode(*raw_image, block_size, precinct_size, 0);
}
if (!compressedImage->encode(raw_image, 0.0f))
{
- llinfos << "convertToUploadFile : encode returns with error!!" << llendl;
+ LL_INFOS() << "convertToUploadFile : encode returns with error!!" << LL_ENDL;
// Clear up the pointer so we don't leak that one
compressedImage = NULL;
}
@@ -1276,11 +1275,11 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
max_texmem = 128;
}
- llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << llendl;
+ llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL;
}
S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB
- //llinfos << "*** DETECTED " << system_ram << " MB of system memory." << llendl;
+ //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL;
if (get_recommended)
max_texmem = llmin(max_texmem, (S32)(system_ram/2));
else
@@ -1344,8 +1343,8 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
mMaxTotalTextureMemInMegaBytes = system_ram - min_non_texture_mem ;
}
- llinfos << "Total Video Memory set to: " << vb_mem << " MB" << llendl;
- llinfos << "Available Texture Memory set to: " << (vb_mem - fb_mem) << " MB" << llendl;
+ LL_INFOS() << "Total Video Memory set to: " << vb_mem << " MB" << LL_ENDL;
+ LL_INFOS() << "Available Texture Memory set to: " << (vb_mem - fb_mem) << " MB" << LL_ENDL;
}
///////////////////////////////////////////////////////////////////////////////
@@ -1394,8 +1393,8 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
{
// msg->getSizeFast() is probably trying to tell us there
// was an error.
- llerrs << "image header chunk size was negative: "
- << data_size << llendl;
+ LL_ERRS() << "image header chunk size was negative: "
+ << data_size << LL_ENDL;
return;
}
@@ -1464,13 +1463,13 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
{
// msg->getSizeFast() is probably trying to tell us there
// was an error.
- llerrs << "image data chunk size was negative: "
- << data_size << llendl;
+ LL_ERRS() << "image data chunk size was negative: "
+ << data_size << LL_ENDL;
return;
}
if (data_size > MTUBYTES)
{
- llerrs << "image data chunk too large: " << data_size << " bytes" << llendl;
+ LL_ERRS() << "image data chunk too large: " << data_size << " bytes" << LL_ENDL;
return;
}
U8 *data = new U8[data_size];
@@ -1507,7 +1506,7 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **
LLViewerFetchedTexture* image = gTextureList.findImage( image_id );
if( image )
{
- llwarns << "not in db" << llendl;
+ llwarns << "not in db" << LL_ENDL;
image->setIsMissingAsset();
}
}
@@ -1634,7 +1633,7 @@ LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::s
if (found_it != mUIImages.end())
{
// image already loaded!
- llerrs << "UI Image " << name << " already loaded." << llendl;
+ LL_ERRS() << "UI Image " << name << " already loaded." << LL_ENDL;
}
return loadUIImageByName(name, filename, use_mips, scale_rect, clip_rect);
@@ -1737,7 +1736,7 @@ bool LLUIImageList::initFromFile()
std::vector<std::string>::const_iterator pi(textures_paths.begin()), pend(textures_paths.end());
if (pi == pend)
{
- llwarns << "No textures.xml found in skins directories" << llendl;
+ llwarns << "No textures.xml found in skins directories" << LL_ENDL;
return false;
}
@@ -1745,12 +1744,12 @@ bool LLUIImageList::initFromFile()
LLXMLNodePtr root;
if (!LLXMLNode::parseFile(*pi, root, NULL))
{
- llwarns << "Unable to parse UI image list file " << *pi << llendl;
+ llwarns << "Unable to parse UI image list file " << *pi << LL_ENDL;
return false;
}
if (!root->hasAttribute("version"))
{
- llwarns << "No valid version number in UI image list file " << *pi << llendl;
+ llwarns << "No valid version number in UI image list file " << *pi << LL_ENDL;
return false;
}