diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-07-16 16:40:29 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-07-16 16:40:29 +0300 |
commit | 97a43e303b1dc0d2a6ca21c95555527b89d271b8 (patch) | |
tree | 08955536d1fafbe3c00f260b9786b7bec01fa617 | |
parent | a97485fa60f1b1f29d8109b79450ab993880529c (diff) | |
parent | 565d5dc1a9a4617874710ce7ede82a30c203f03f (diff) |
Merge from default branch
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llagentwearables.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llagentwearables.h | 3 | ||||
-rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpaneleditwearable.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llpaneleditwearable.h | 2 | ||||
-rw-r--r-- | indra/newview/llpreviewtexture.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lltexturecache.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 50 | ||||
-rw-r--r-- | indra/newview/llviewertexture.h | 16 | ||||
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llwearable.cpp | 2 |
13 files changed, 75 insertions, 61 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index efa5eca217..6ee5a8b279 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -384,7 +384,8 @@ void LLAgentWearables::sendAgentWearablesUpdate() gAgent.sendReliableMessage(); } -void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update) +void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update, + const std::string new_name) { LLWearable* old_wearable = getWearable(type, index); if (old_wearable && (old_wearable->isDirty() || old_wearable->isOldVersion())) @@ -402,6 +403,14 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 LLInventoryItem* item = gInventory.getItem(old_item_id); if (item) { + std::string item_name = item->getName(); + bool name_changed = false; + if (!new_name.empty() && (new_name != item->getName())) + { + llinfos << "saveWearable changing name from " << item->getName() << " to " << new_name << llendl; + item_name = new_name; + name_changed = true; + } // Update existing inventory item LLPointer<LLViewerInventoryItem> template_item = new LLViewerInventoryItem(item->getUUID(), @@ -410,7 +419,7 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 new_wearable->getAssetID(), new_wearable->getAssetType(), item->getInventoryType(), - item->getName(), + item_name, item->getDescription(), item->getSaleInfo(), item->getFlags(), @@ -418,6 +427,10 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 template_item->setTransactionID(new_wearable->getTransactionID()); template_item->updateServer(FALSE); gInventory.updateItem(template_item); + if (name_changed) + { + gInventory.notifyObservers(); + } } else { diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 8122971db6..f3457363a0 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -206,7 +206,8 @@ private: //-------------------------------------------------------------------- public: void saveWearableAs(const LLWearableType::EType type, const U32 index, const std::string& new_name, BOOL save_in_lost_and_found); - void saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update = TRUE); + void saveWearable(const LLWearableType::EType type, const U32 index, BOOL send_update = TRUE, + const std::string new_name = ""); void saveAllWearables(); void revertWearable(const LLWearableType::EType type, const U32 index); diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 68809b0926..c206daf89b 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -149,7 +149,7 @@ void LLStandardBumpmap::restoreGL() 0, 0); gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLViewerTexture::BOOST_BUMP) ; - gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL, NULL ); + gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL ); LLStandardBumpmap::sStandardBumpmapCount++; } @@ -923,7 +923,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText // Note: this may create an LLImageGL immediately src_image->setBoostLevel(LLViewerTexture::BOOST_BUMP) ; - src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL, NULL ); + src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL ); bump = (*entries_list)[src_image->getID()]; // In case callback was called immediately and replaced the image // bump_total++; diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 14f05bdb17..f7e8a7b1a7 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -839,7 +839,7 @@ void LLPanelEditWearable::saveAsCallback(const LLSD& notification, const LLSD& r if( !wearable_name.empty() ) { mNameEditor->setText(wearable_name); - saveChanges(); + saveChanges(true); } } } @@ -971,7 +971,7 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type) } } -void LLPanelEditWearable::saveChanges() +void LLPanelEditWearable::saveChanges(bool force_save_as) { if (!mWearablePtr || !isDirty()) { @@ -980,16 +980,18 @@ void LLPanelEditWearable::saveChanges() } U32 index = gAgentWearables.getWearableIndex(mWearablePtr); - - if (mWearablePtr->getName().compare(mNameEditor->getText()) != 0) + + std::string new_name = mNameEditor->getText(); + if (force_save_as) { // the name of the wearable has changed, re-save wearable with new name LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID(),false); - gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, mNameEditor->getText(), FALSE); + gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, FALSE); + mNameEditor->setText(mWearablePtr->getName()); } else { - gAgentWearables.saveWearable(mWearablePtr->getType(), index); + gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name); } } diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index bfce2ae56e..dbda90fe9f 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -63,7 +63,7 @@ public: LLWearable* getWearable() { return mWearablePtr; } void setWearable(LLWearable *wearable); - void saveChanges(); + void saveChanges(bool force_save_as = false); void revertChanges(); void showDefaultSubpart(); diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index c4cbbbb791..7fdc5c8b5f 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -88,7 +88,7 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key) LLPreviewTexture::~LLPreviewTexture() { - LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList, this) ; + LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList) ; if( mLoadingFullImage ) { @@ -281,7 +281,7 @@ void LLPreviewTexture::saveAs() mLoadingFullImage = TRUE; getWindow()->incBusyCount(); mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave, - 0, TRUE, FALSE, new LLUUID( mItemUUID ), this, &mCallbackTextureList ); + 0, TRUE, FALSE, new LLUUID( mItemUUID ), &mCallbackTextureList ); } // virtual diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 9ad2322765..403692951f 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -391,6 +391,7 @@ bool LLTextureCacheRemoteWorker::doRead() } else { + //llinfos << "texture " << mID.asString() << " found in local_assets" << llendl; mImageSize = local_size; mImageLocal = TRUE; } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 75bb9f84e2..928525244c 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -114,7 +114,6 @@ LLLoadedCallbackEntry::LLLoadedCallbackEntry(loaded_callback_func cb, BOOL need_imageraw, // Needs image raw for the callback void* userdata, LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, - void* source, LLViewerFetchedTexture* target, BOOL pause) : mCallback(cb), @@ -123,7 +122,6 @@ LLLoadedCallbackEntry::LLLoadedCallbackEntry(loaded_callback_func cb, mNeedsImageRaw(need_imageraw), mUserData(userdata), mSourceCallbackList(src_callback_list), - mSource(source), mPaused(pause) { if(mSourceCallbackList) @@ -145,10 +143,10 @@ void LLLoadedCallbackEntry::removeTexture(LLViewerFetchedTexture* tex) } //static -void LLLoadedCallbackEntry::cleanUpCallbackList(LLLoadedCallbackEntry::source_callback_list_t* callback_list, void* src) +void LLLoadedCallbackEntry::cleanUpCallbackList(LLLoadedCallbackEntry::source_callback_list_t* callback_list) { //clear texture callbacks. - if(!callback_list->empty()) + if(callback_list && !callback_list->empty()) { for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = callback_list->begin(); iter != callback_list->end(); ++iter) @@ -156,7 +154,7 @@ void LLLoadedCallbackEntry::cleanUpCallbackList(LLLoadedCallbackEntry::source_ca LLViewerFetchedTexture* tex = gTextureList.findImage(*iter) ; if(tex) { - tex->deleteCallbackEntry(src) ; + tex->deleteCallbackEntry(callback_list) ; } } callback_list->clear() ; @@ -514,6 +512,7 @@ LLViewerTexture::LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps) LLViewerTexture::~LLViewerTexture() { + cleanup(); sImageCount--; } @@ -547,7 +546,6 @@ S8 LLViewerTexture::getType() const return LLViewerTexture::LOCAL_TEXTURE ; } -//virtual void LLViewerTexture::cleanup() { mFaceList.clear() ; @@ -1186,7 +1184,6 @@ S8 LLViewerFetchedTexture::getType() const return LLViewerTexture::FETCHED_TEXTURE ; } -//virtual void LLViewerFetchedTexture::cleanup() { for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); @@ -1208,8 +1205,6 @@ void LLViewerFetchedTexture::cleanup() mCachedRawDiscardLevel = -1 ; mCachedRawImageReady = FALSE ; mSavedRawImage = NULL ; - - LLViewerTexture::cleanup(); } void LLViewerFetchedTexture::setForSculpt() @@ -2038,7 +2033,7 @@ void LLViewerFetchedTexture::setIsMissingAsset() } void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_callback, - S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, void* userdata, void* src, + S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, void* userdata, LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, BOOL pause) { // @@ -2057,9 +2052,9 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call if(mPauseLoadedCallBacks && !pause) { - unpauseLoadedCallbacks(src) ; + unpauseLoadedCallbacks(src_callback_list) ; } - LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata, src_callback_list, src, this, pause); + LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata, src_callback_list, this, pause); mLoadedCallbackList.push_back(entryp); mNeedsAux |= needs_aux; @@ -2074,9 +2069,9 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call } } -void LLViewerFetchedTexture::deleteCallbackEntry(void* src) +void LLViewerFetchedTexture::deleteCallbackEntry(const LLLoadedCallbackEntry::source_callback_list_t* callback_list) { - if(mLoadedCallbackList.empty()) + if(mLoadedCallbackList.empty() || !callback_list) { return ; } @@ -2087,13 +2082,13 @@ void LLViewerFetchedTexture::deleteCallbackEntry(void* src) iter != mLoadedCallbackList.end(); ) { LLLoadedCallbackEntry *entryp = *iter; - if(entryp->mSource == src) + if(entryp->mSourceCallbackList == callback_list) { // We never finished loading the image. Indicate failure. // Note: this allows mLoadedCallbackUserData to be cleaned up. entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData); - delete entryp; iter = mLoadedCallbackList.erase(iter) ; + delete entryp; } else { @@ -2132,14 +2127,20 @@ void LLViewerFetchedTexture::deleteCallbackEntry(void* src) } } -void LLViewerFetchedTexture::unpauseLoadedCallbacks(void* src) +void LLViewerFetchedTexture::unpauseLoadedCallbacks(const LLLoadedCallbackEntry::source_callback_list_t* callback_list) { + if(!callback_list) + { + mPauseLoadedCallBacks = FALSE ; + return ; + } + BOOL need_raw = FALSE ; for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); iter != mLoadedCallbackList.end(); ) { LLLoadedCallbackEntry *entryp = *iter++; - if(entryp->mSource == src) + if(entryp->mSourceCallbackList == callback_list) { entryp->mPaused = FALSE ; if(entryp->mNeedsImageRaw) @@ -2155,15 +2156,20 @@ void LLViewerFetchedTexture::unpauseLoadedCallbacks(void* src) } } -void LLViewerFetchedTexture::pauseLoadedCallbacks(void* src) +void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::source_callback_list_t* callback_list) { + if(!callback_list) + { + return ; + } + bool paused = true ; for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); iter != mLoadedCallbackList.end(); ) { LLLoadedCallbackEntry *entryp = *iter++; - if(entryp->mSource == src) + if(entryp->mSourceCallbackList == callback_list) { entryp->mPaused = TRUE ; } @@ -2340,10 +2346,6 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() BOOL final = mRawDiscardLevel <= entryp->mDesiredDiscard ? TRUE : FALSE; //llinfos << "Running callback for " << getID() << llendl; //llinfos << mRawImage->getWidth() << "x" << mRawImage->getHeight() << llendl; - if (final) - { - //llinfos << "Final!" << llendl; - } entryp->mLastUsedDiscard = mRawDiscardLevel; entryp->mCallback(TRUE, this, mRawImage, mAuxRawImage, mRawDiscardLevel, final, entryp->mUserData); if (final) diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index b33d04e8dd..1f0d760daf 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -75,7 +75,6 @@ public: BOOL need_imageraw, // Needs image raw for the callback void* userdata, source_callback_list_t* src_callback_list, - void* source, LLViewerFetchedTexture* target, BOOL pause); ~LLLoadedCallbackEntry(); @@ -88,10 +87,9 @@ public: BOOL mPaused; void* mUserData; source_callback_list_t* mSourceCallbackList; - void* mSource; public: - static void cleanUpCallbackList(LLLoadedCallbackEntry::source_callback_list_t* callback_list, void* src) ; + static void cleanUpCallbackList(LLLoadedCallbackEntry::source_callback_list_t* callback_list) ; }; class LLTextureBar; @@ -265,7 +263,7 @@ public: /*virtual*/ void updateBindStatsForTester() ; protected: - virtual void cleanup() ; + void cleanup() ; void init(bool firstinit) ; void reorganizeFaceList() ; void reorganizeVolumeList() ; @@ -387,13 +385,13 @@ public: // Set callbacks to get called when the image gets updated with higher // resolution versions. void setLoadedCallback(loaded_callback_func cb, - S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, void* src, + S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, void* userdata, LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, BOOL pause = FALSE); bool hasCallbacks() { return mLoadedCallbackList.empty() ? false : true; } - void pauseLoadedCallbacks(void* src); - void unpauseLoadedCallbacks(void* src); + void pauseLoadedCallbacks(const LLLoadedCallbackEntry::source_callback_list_t* callback_list); + void unpauseLoadedCallbacks(const LLLoadedCallbackEntry::source_callback_list_t* callback_list); bool doLoadedCallbacks(); - void deleteCallbackEntry(void* src); + void deleteCallbackEntry(const LLLoadedCallbackEntry::source_callback_list_t* callback_list); void addToCreateTexture(); @@ -488,7 +486,7 @@ protected: private: void init(bool firstinit) ; - /*virtual*/ void cleanup() ; + void cleanup() ; void saveRawImage() ; void setCachedRawImage() ; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index f2a3839f97..31f0998fab 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1411,7 +1411,7 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st datap->mImageName = name; datap->mImageScaleRegion = scale_rect; - imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap, NULL, NULL); + imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap, NULL); } return new_imagep; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 07b98eaf82..53b47ec408 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -835,6 +835,7 @@ LLVOAvatar::~LLVOAvatar() mDead = TRUE; mAnimationSources.clear(); + LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList) ; lldebugs << "LLVOAvatar Destructor end" << llendl; } @@ -848,7 +849,7 @@ void LLVOAvatar::markDead() sNumVisibleChatBubbles--; } mVoiceVisualizer->markDead(); - LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList, this) ; + LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList) ; LLViewerObject::markDead(); } @@ -4255,13 +4256,13 @@ void LLVOAvatar::checkTextureLoading() { if(pause)//pause texture fetching. { - tex->pauseLoadedCallbacks(this) ; + tex->pauseLoadedCallbacks(&mCallbackTextureList) ; } else//unpause { static const F32 START_AREA = 100.f ; - tex->unpauseLoadedCallbacks(this) ; + tex->unpauseLoadedCallbacks(&mCallbackTextureList) ; tex->addTextureStats(START_AREA); //jump start the fetching again } } @@ -6210,11 +6211,9 @@ void LLVOAvatar::updateMeshTextures() const BOOL self_customizing = isSelf() && gAgentCamera.cameraCustomizeAvatar(); // During face edit mode, we don't use baked textures const BOOL other_culled = !isSelf() && mCulled; LLLoadedCallbackEntry::source_callback_list_t* src_callback_list = NULL ; - void* callback_src = NULL ; BOOL paused = FALSE; if(!isSelf()) { - callback_src = this ; src_callback_list = &mCallbackTextureList ; paused = mLoadedCallbacksPaused ; } @@ -6290,10 +6289,10 @@ void LLVOAvatar::updateMeshTextures() if ( (baked_img->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) ) { baked_img->setLoadedCallback(onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ), - callback_src, src_callback_list, paused); + src_callback_list, paused); } baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ), - callback_src, src_callback_list, paused ); + src_callback_list, paused ); } } else if (mBakedTextureDatas[i].mTexLayerSet @@ -6754,11 +6753,9 @@ void LLVOAvatar::onFirstTEMessageReceived() mFirstTEMessageReceived = TRUE; LLLoadedCallbackEntry::source_callback_list_t* src_callback_list = NULL ; - void* callback_src = NULL ; BOOL paused = FALSE ; if(!isSelf()) { - callback_src = this ; src_callback_list = &mCallbackTextureList ; paused = mLoadedCallbacksPaused ; } @@ -6777,10 +6774,10 @@ void LLVOAvatar::onFirstTEMessageReceived() if ( (image->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) ) { image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ), - callback_src, src_callback_list, paused); + src_callback_list, paused); } image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ), - callback_src, src_callback_list, paused ); + src_callback_list, paused ); } } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index b80e47e11a..8961d2c285 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1633,7 +1633,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te } else { - tex->setLoadedCallback(onLocalTextureLoaded, desired_discard, TRUE, FALSE, new LLAvatarTexData(getID(), type), NULL, NULL); + tex->setLoadedCallback(onLocalTextureLoaded, desired_discard, TRUE, FALSE, new LLAvatarTexData(getID(), type), NULL); } } tex->setMinDiscardLevel(desired_discard); diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index ec9c78ee53..401e2cdb1b 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -445,7 +445,7 @@ BOOL LLWearable::importFile( LLFILE* file ) } image->setBoostLevel(LLViewerTexture::BOOST_AVATAR_SELF) ; - image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(id, (LLVOAvatarDefines::ETextureIndex)te), NULL, NULL); + image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(id, (LLVOAvatarDefines::ETextureIndex)te), NULL); LLUUID textureid(text_buffer); mTEMap[te] = new LLLocalTextureObject(image, textureid); |