No idea what this was for, but it was making me leaky and slow
This commit is contained in:
@@ -101,67 +101,6 @@ BOOL LLViewerImage::sFreezeImageScalingDown = FALSE ;
|
||||
//debug use
|
||||
S32 LLViewerImage::sLLViewerImageCount = 0 ;
|
||||
|
||||
// <edit>
|
||||
class CommentCacheReadResponder : public LLTextureCache::ReadResponder
|
||||
{
|
||||
public:
|
||||
CommentCacheReadResponder(LLPointer<LLViewerImage> image)
|
||||
: mViewerImage(image)
|
||||
{
|
||||
mID = image->getID();
|
||||
mFormattedImage = new LLImageJ2C;
|
||||
setImage(mFormattedImage);
|
||||
}
|
||||
void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal)
|
||||
{
|
||||
if(imageformat==IMG_CODEC_TGA && mFormattedImage->getCodec()==IMG_CODEC_J2C)
|
||||
{
|
||||
//llwarns<<"Bleh its a tga not saving"<<llendl;
|
||||
mFormattedImage=NULL;
|
||||
mImageSize=0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mFormattedImage.notNull())
|
||||
{
|
||||
llassert_always(mFormattedImage->getCodec() == imageformat);
|
||||
mFormattedImage->appendData(data, datasize);
|
||||
}
|
||||
else
|
||||
{
|
||||
mFormattedImage = LLImageFormatted::createFromType(imageformat);
|
||||
mFormattedImage->setData(data,datasize);
|
||||
}
|
||||
mImageSize = imagesize;
|
||||
mImageLocal = imagelocal;
|
||||
}
|
||||
|
||||
virtual void completed(bool success)
|
||||
{
|
||||
if(success && (mFormattedImage.notNull()) && mImageSize>0 && mViewerImage.notNull())
|
||||
{
|
||||
|
||||
//llinfos << "SUCCESS getting texture "<<mID<< llendl;
|
||||
mViewerImage->commentEncryptionType = LLImageMetaDataReader::ExtractEncodedComment(
|
||||
mFormattedImage->getData(),
|
||||
mFormattedImage->getDataSize(),
|
||||
mViewerImage->decodedComment
|
||||
);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//if(!success)
|
||||
// llwarns << "FAIL NOT SUCCESSFUL getting texture "<<mID<< llendl;
|
||||
}
|
||||
}
|
||||
private:
|
||||
LLPointer<LLImageFormatted> mFormattedImage;
|
||||
LLPointer<LLViewerImage> mViewerImage;
|
||||
LLUUID mID;
|
||||
};
|
||||
// </edit>
|
||||
|
||||
// static
|
||||
void LLViewerImage::initClass()
|
||||
{
|
||||
@@ -619,11 +558,6 @@ BOOL LLViewerImage::createTexture(S32 usename/*= 0*/)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// <edit>
|
||||
CommentCacheReadResponder* responder = new CommentCacheReadResponder(this);
|
||||
LLAppViewer::getTextureCache()->readFromCache(getID(),LLWorkerThread::PRIORITY_HIGH,0,999999,responder);
|
||||
// </edit>
|
||||
|
||||
res = LLImageGL::createGLTexture(mRawDiscardLevel, mRawImage, usename);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user