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) ...@@ -75,7 +75,8 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key)
mLastWidth(0), mLastWidth(0),
mAspectRatio(0.f), mAspectRatio(0.f),
mPreviewToSave(FALSE), mPreviewToSave(FALSE),
mImage(NULL) mImage(NULL),
mImageOldBoostLevel(LLViewerTexture::BOOST_NONE)
{ {
updateImageID(); updateImageID();
if (key.has("save_as")) if (key.has("save_as"))
...@@ -93,7 +94,7 @@ LLPreviewTexture::~LLPreviewTexture() ...@@ -93,7 +94,7 @@ LLPreviewTexture::~LLPreviewTexture()
{ {
getWindow()->decBusyCount(); getWindow()->decBusyCount();
} }
mImage->setBoostLevel(mImageOldBoostLevel);
mImage = NULL; mImage = NULL;
} }
...@@ -543,6 +544,7 @@ void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata) ...@@ -543,6 +544,7 @@ void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata)
void LLPreviewTexture::loadAsset() void LLPreviewTexture::loadAsset()
{ {
mImage = LLViewerTextureManager::getFetchedTexture(mImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); mImage = LLViewerTextureManager::getFetchedTexture(mImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
mImageOldBoostLevel = mImage->getBoostLevel();
mImage->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); mImage->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
mImage->forceToSaveRawImage(0) ; mImage->forceToSaveRawImage(0) ;
mAssetStatus = PREVIEW_ASSET_LOADING; mAssetStatus = PREVIEW_ASSET_LOADING;
......
...@@ -82,9 +82,10 @@ class LLPreviewTexture : public LLPreview ...@@ -82,9 +82,10 @@ class LLPreviewTexture : public LLPreview
void updateDimensions(); void updateDimensions();
LLUUID mImageID; LLUUID mImageID;
LLPointer<LLViewerFetchedTexture> mImage; LLPointer<LLViewerFetchedTexture> mImage;
BOOL mLoadingFullImage; S32 mImageOldBoostLevel;
std::string mSaveFileName; std::string mSaveFileName;
LLFrameTimer mSavedFileTimer; LLFrameTimer mSavedFileTimer;
BOOL mLoadingFullImage;
BOOL mShowKeepDiscard; BOOL mShowKeepDiscard;
BOOL mCopyToInv; BOOL mCopyToInv;
...@@ -94,11 +95,10 @@ class LLPreviewTexture : public LLPreview ...@@ -94,11 +95,10 @@ class LLPreviewTexture : public LLPreview
// This is stored off in a member variable, because the save-as // This is stored off in a member variable, because the save-as
// button and drag and drop functionality need to know. // button and drag and drop functionality need to know.
BOOL mIsCopyable; BOOL mIsCopyable;
BOOL mUpdateDimensions;
S32 mLastHeight; S32 mLastHeight;
S32 mLastWidth; S32 mLastWidth;
F32 mAspectRatio; F32 mAspectRatio;
BOOL mUpdateDimensions;
LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; 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