Minor upstream catchup. Added LLImageRaw::duplicate and no_copy parameter to LLImageRaw::LLImageRaw

This commit is contained in:
Shyotl
2013-10-26 16:39:31 -05:00
parent 2a432f73da
commit 7c7c64bde3
4 changed files with 35 additions and 12 deletions

View File

@@ -1208,7 +1208,12 @@ void LLViewerFetchedTexture::addToCreateTexture()
destroyRawImage();
return ;
}
mRawImage->scale(w >> i, h >> i) ;
{
//make a duplicate in case somebody else is using this raw image
mRawImage = mRawImage->duplicate();
mRawImage->scale(w >> i, h >> i) ;
}
}
}
}
@@ -2540,7 +2545,11 @@ void LLViewerFetchedTexture::setCachedRawImage()
mIsRawImageValid = 0;
return;
}
mRawImage->scale(w >> i, h >> i) ;
{
//make a duplicate in case somebody else is using this raw image
mRawImage = mRawImage->duplicate();
mRawImage->scale(w >> i, h >> i) ;
}
}
if(mCachedRawImage.notNull())
mCachedRawImage->setInCache(false);