Skip to content
Snippets Groups Projects
Commit d9ff1c28 authored by Xiaohong Bao's avatar Xiaohong Bao
Browse files

EXT-7500: FIXED: Texture Jamming problems with http texture off

parent 0ba75fe2
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,8 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key)
mLastWidth(0),
mAspectRatio(0.f),
mPreviewToSave(FALSE),
mImage(NULL)
mImage(NULL),
mImageOldBoostLevel(LLViewerTexture::BOOST_NONE)
{
updateImageID();
if (key.has("save_as"))
......@@ -93,7 +94,7 @@ LLPreviewTexture::~LLPreviewTexture()
{
getWindow()->decBusyCount();
}
mImage->setBoostLevel(mImageOldBoostLevel);
mImage = NULL;
}
......@@ -543,6 +544,7 @@ void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata)
void LLPreviewTexture::loadAsset()
{
mImage = LLViewerTextureManager::getFetchedTexture(mImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
mImageOldBoostLevel = mImage->getBoostLevel();
mImage->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
mImage->forceToSaveRawImage(0) ;
mAssetStatus = PREVIEW_ASSET_LOADING;
......
......@@ -82,9 +82,10 @@ class LLPreviewTexture : public LLPreview
void updateDimensions();
LLUUID mImageID;
LLPointer<LLViewerFetchedTexture> mImage;
BOOL mLoadingFullImage;
S32 mImageOldBoostLevel;
std::string mSaveFileName;
LLFrameTimer mSavedFileTimer;
BOOL mLoadingFullImage;
BOOL mShowKeepDiscard;
BOOL mCopyToInv;
......@@ -94,11 +95,10 @@ class LLPreviewTexture : public LLPreview
// This is stored off in a member variable, because the save-as
// button and drag and drop functionality need to know.
BOOL mIsCopyable;
BOOL mUpdateDimensions;
S32 mLastHeight;
S32 mLastWidth;
F32 mAspectRatio;
BOOL mUpdateDimensions;
F32 mAspectRatio;
LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment