From 00d534d7a7a21798d50be047de62e9f2e7b6092a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 25 May 2010 14:56:45 -0400 Subject: EXT-7480 Add debuga bility to set texture discard levels Added TextureDiscardLevel override for specifying texture discard levels. Aesthetic change to add debug- flag to all avatar debug reporting metrics. --- indra/newview/llviewertexture.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llviewertexture.cpp') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index d925ab0d90..d8a9ce9374 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1893,6 +1893,12 @@ bool LLViewerFetchedTexture::updateFetch() h = mGLTexturep->getHeight(0); c = mComponents; } + + const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + if (override_tex_discard_level != 0) + { + desired_discard = override_tex_discard_level; + } // bypass texturefetch directly by pulling from LLTextureCache bool fetch_request_created = false; -- cgit v1.3 From 4c0624b04e73f53040179d3688b0234ca84830cb Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 4 Jun 2010 22:26:39 -0600 Subject: EXT-7500: PARTIAL FIXED: Texture Jamming problems with http texture off --- indra/newview/llviewertexture.cpp | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewertexture.cpp') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index d8a9ce9374..7e779986df 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1447,8 +1447,14 @@ void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height) //virtual void LLViewerFetchedTexture::processTextureStats() { - if(mFullyLoaded)//already loaded + if(mFullyLoaded) { + if(mDesiredDiscardLevel <= mMinDesiredDiscardLevel)//already loaded + { + return ; + } + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ; + mFullyLoaded = FALSE ; return ; } @@ -1482,6 +1488,7 @@ void LLViewerFetchedTexture::processTextureStats() mDesiredDiscardLevel = (S8)llmin(log((F32)mFullWidth / mKnownDrawWidth) / log_2, log((F32)mFullHeight / mKnownDrawHeight) / log_2) ; mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel()) ; + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ; } mKnownDrawSizeChanged = FALSE ; @@ -1514,7 +1521,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } if(mFullyLoaded && !mForceToSaveRawImage)//already loaded for static texture { - return -4.0f ; //alreay fetched + return -1.0f ; //alreay fetched } S32 cur_discard = getCurrentDiscardLevelForFetching(); @@ -1528,16 +1535,16 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } else if(mDesiredDiscardLevel >= cur_discard && cur_discard > -1) { - priority = -1.0f ; + priority = -2.0f ; } else if(mCachedRawDiscardLevel > -1 && mDesiredDiscardLevel >= mCachedRawDiscardLevel) { - priority = -1.0f; + priority = -3.0f; } else if (mDesiredDiscardLevel > getMaxDiscardLevel()) { // Don't decode anything we don't need - priority = -1.0f; + priority = -4.0f; } else if ((mBoostLevel == LLViewerTexture::BOOST_UI || mBoostLevel == LLViewerTexture::BOOST_ICON) && !have_all_data) { @@ -1551,9 +1558,14 @@ F32 LLViewerFetchedTexture::calcDecodePriority() // Always want high boosted images priority = 1.f; } + else if(mForceToSaveRawImage) + { + //force to fetch the raw image. + priority = 1.f; + } else { - priority = -1.f; //stop fetching + priority = -5.f; //stop fetching } } else if (cur_discard < 0) @@ -1569,7 +1581,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() else if ((mMinDiscardLevel > 0) && (cur_discard <= mMinDiscardLevel)) { // larger mips are corrupted - priority = -3.0f; + priority = -6.0f; } else { @@ -2052,10 +2064,13 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() bool run_raw_callbacks = false; bool need_readback = false; + mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); iter != mLoadedCallbackList.end(); ) { LLLoadedCallbackEntry *entryp = *iter++; + mMinDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel, (S8)entryp->mDesiredDiscard) ; + if (entryp->mNeedsImageRaw) { if (mNeedsAux) @@ -2187,6 +2202,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() if (mLoadedCallbackList.empty()) { gTextureList.mCallbackList.erase(this); + mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; } // Done with any raw image data at this point (will be re-created if we still have callbacks) -- cgit v1.3 From 80b3884a6add8600d8d13d7b72018ec85337cd7e Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 7 Jun 2010 15:34:43 -0600 Subject: more for EXT-7500: PARTIAL FIXED: Texture Jamming problems with http texture off. Raise priorities of textures for self avatar to the highest. --- indra/newview/llviewertexture.cpp | 10 +++++----- indra/newview/llviewertexture.h | 1 + indra/newview/llvoavatar.cpp | 6 ++++++ indra/newview/llvoavatarself.cpp | 5 +++++ 4 files changed, 17 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewertexture.cpp') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 7e779986df..9b5b210bf7 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -541,11 +541,6 @@ void LLViewerTexture::setBoostLevel(S32 level) if(mBoostLevel != LLViewerTexture::BOOST_NONE) { setNoDelete() ; - - if(LLViewerTexture::BOOST_AVATAR_BAKED_SELF == mBoostLevel || LLViewerTexture::BOOST_AVATAR_BAKED == mBoostLevel) - { - mCanResetMaxVirtualSize = false ; - } } if(gAuditTexture) { @@ -596,6 +591,11 @@ void LLViewerTexture::forceImmediateUpdate() { } +void LLViewerTexture::setResetMaxVirtualSizeFlag(bool flag) +{ + mCanResetMaxVirtualSize = flag ; +} + void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const { if(needs_gltexture) diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 1bd4cc793d..361f56e02f 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -166,6 +166,7 @@ public: void addTextureStats(F32 virtual_size, BOOL needs_gltexture = TRUE) const; void resetTextureStats(); + void setResetMaxVirtualSizeFlag(bool flag) ; virtual F32 getMaxVirtualSize() ; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1fa953f157..b5faa984eb 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4209,10 +4209,16 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel { mMaxPixelArea = llmax(pixel_area, mMaxPixelArea); mMinPixelArea = llmin(pixel_area, mMinPixelArea); + imagep->resetTextureStats(); + imagep->setResetMaxVirtualSizeFlag(false) ; imagep->setCanUseHTTP(false) ; //turn off http fetching for baked textures. imagep->addTextureStats(pixel_area / texel_area_ratio); imagep->setBoostLevel(boost_level); + if(boost_level == LLViewerTexture::BOOST_AVATAR_BAKED_SELF) + { + imagep->setAdditionalDecodePriority(1.0f) ; + } } //virtual diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 2722646eff..91a5c50b50 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2036,8 +2036,13 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe F32 desired_pixels; desired_pixels = llmin(mPixelArea, (F32)getTexImageArea()); imagep->setBoostLevel(getAvatarBoostLevel()); + + imagep->resetTextureStats(); + imagep->setResetMaxVirtualSizeFlag(false) ; imagep->addTextureStats( desired_pixels / texel_area_ratio ); + imagep->setAdditionalDecodePriority(1.0f) ; imagep->forceUpdateBindStats() ; + if (imagep->getDiscardLevel() < 0) { mHasGrey = TRUE; // for statistics gathering -- cgit v1.3 From 26b03161f5d881e8fbda5f15c6db3e0c29e7b834 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 30 Jun 2010 18:21:08 -0600 Subject: fix for EXT-7839: texture console is stalled; fix for EXT-7500: Texture Jamming problems with http texture off; --- indra/newview/lldrawpoolbump.cpp | 10 +- indra/newview/llpreviewtexture.cpp | 4 +- indra/newview/llpreviewtexture.h | 2 + indra/newview/llviewertexture.cpp | 231 ++++++++++++++++++++++++++++------ indra/newview/llviewertexture.h | 72 +++++++---- indra/newview/llviewertexturelist.cpp | 6 +- indra/newview/llvoavatar.cpp | 104 +++++++++++++-- indra/newview/llvoavatar.h | 7 +- indra/newview/llvoavatarself.cpp | 6 +- indra/newview/llwearable.cpp | 5 +- indra/newview/llwearable.h | 1 + 11 files changed, 357 insertions(+), 91 deletions(-) (limited to 'indra/newview/llviewertexture.cpp') diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 19cdccb630..68809b0926 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -147,8 +147,9 @@ void LLStandardBumpmap::restoreGL() LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, - 0); - gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL ); + 0); + gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLViewerTexture::BOOST_BUMP) ; + gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL, NULL ); LLStandardBumpmap::sStandardBumpmapCount++; } @@ -817,7 +818,7 @@ void LLBumpImageList::addTextureStats(U8 bump, const LLUUID& base_image_id, F32 bump &= TEM_BUMP_MASK; LLViewerFetchedTexture* bump_image = gStandardBumpmapList[bump].mImage; if( bump_image ) - { + { bump_image->addTextureStats(virtual_size); } } @@ -921,7 +922,8 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText (*entries_list)[src_image->getID()]->setExplicitFormat(GL_ALPHA8, GL_ALPHA); // Note: this may create an LLImageGL immediately - src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()) ); + src_image->setBoostLevel(LLViewerTexture::BOOST_BUMP) ; + src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL, NULL ); bump = (*entries_list)[src_image->getID()]; // In case callback was called immediately and replaced the image // bump_total++; diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 22a1ef94a7..bf18c9e5e7 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -87,6 +87,8 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key) LLPreviewTexture::~LLPreviewTexture() { + LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList, this) ; + if( mLoadingFullImage ) { getWindow()->decBusyCount(); @@ -278,7 +280,7 @@ void LLPreviewTexture::saveAs() mLoadingFullImage = TRUE; getWindow()->incBusyCount(); mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave, - 0, TRUE, FALSE, new LLUUID( mItemUUID ) ); + 0, TRUE, FALSE, new LLUUID( mItemUUID ), this, &mCallbackTextureList ); } // virtual diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 7cd2adad56..0f29a741c1 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -99,5 +99,7 @@ private: S32 mLastWidth; F32 mAspectRatio; BOOL mUpdateDimensions; + + LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; }; #endif // LL_LLPREVIEWTEXTURE_H diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9b5b210bf7..0afbce7d51 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -112,15 +112,57 @@ const F64 log_2 = log(2.0); LLLoadedCallbackEntry::LLLoadedCallbackEntry(loaded_callback_func cb, S32 discard_level, BOOL need_imageraw, // Needs image raw for the callback - void* userdata ) + void* userdata, + LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, + void* source, + LLViewerFetchedTexture* target, + BOOL pause) : mCallback(cb), mLastUsedDiscard(MAX_DISCARD_LEVEL+1), mDesiredDiscard(discard_level), mNeedsImageRaw(need_imageraw), - mUserData(userdata) + mUserData(userdata), + mSourceCallbackList(src_callback_list), + mSource(source), + mPaused(pause) +{ + if(mSourceCallbackList) + { + mSourceCallbackList->insert(target->getID()); + } +} + +LLLoadedCallbackEntry::~LLLoadedCallbackEntry() { } +void LLLoadedCallbackEntry::removeTexture(LLViewerFetchedTexture* tex) +{ + if(mSourceCallbackList) + { + mSourceCallbackList->erase(tex->getID()) ; + } +} + +//static +void LLLoadedCallbackEntry::cleanUpCallbackList(LLLoadedCallbackEntry::source_callback_list_t* callback_list, void* src) +{ + //clear texture callbacks. + if(!callback_list->empty()) + { + for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = callback_list->begin(); + iter != callback_list->end(); ++iter) + { + LLViewerFetchedTexture* tex = gTextureList.findImage(*iter) ; + if(tex) + { + tex->deleteCallbackEntry(src) ; + } + } + callback_list->clear() ; + } +} + LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, BOOL usemipmaps, LLImageGL* gl_image) { return new LLViewerMediaTexture(media_id, usemipmaps, gl_image) ; @@ -324,9 +366,7 @@ void LLViewerTextureManager::cleanup() LLViewerFetchedTexture::sMissingAssetImagep = NULL; LLViewerFetchedTexture::sWhiteImagep = NULL; - LLViewerMediaTexture::cleanup() ; - - LLViewerTexture::cleanupClass() ; + LLViewerMediaTexture::cleanUpClass() ; } //---------------------------------------------------------------------------------------------- @@ -344,11 +384,6 @@ void LLViewerTexture::initClass() } } -// static -void LLViewerTexture::cleanupClass() -{ -} - // static S32 LLViewerTexture::getTotalNumOfCategories() { @@ -492,10 +527,10 @@ void LLViewerTexture::init(bool firstinit) mTextureState = NO_DELETE ; mDontDiscard = FALSE; - mCanResetMaxVirtualSize = true ; mMaxVirtualSize = 0.f; mNeedsGLTexture = FALSE ; - mNeedsResetMaxVirtualSize = FALSE ; + mMaxVirtualSizeResetInterval = 1; + mMaxVirtualSizeResetCounter = 1 ; mAdditionalDecodePriority = 0.f ; mParcelMedia = NULL ; mNumFaces = 0 ; @@ -510,6 +545,7 @@ S8 LLViewerTexture::getType() const return LLViewerTexture::LOCAL_TEXTURE ; } +//virtual void LLViewerTexture::cleanup() { mFaceList.clear() ; @@ -591,11 +627,6 @@ void LLViewerTexture::forceImmediateUpdate() { } -void LLViewerTexture::setResetMaxVirtualSizeFlag(bool flag) -{ - mCanResetMaxVirtualSize = flag ; -} - void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const { if(needs_gltexture) @@ -603,10 +634,10 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co mNeedsGLTexture = TRUE ; } - if(mNeedsResetMaxVirtualSize) + if(!mMaxVirtualSizeResetCounter) { //flag to reset the values because the old values are used. - mNeedsResetMaxVirtualSize = FALSE ; + resetMaxVirtualSizeResetCounter() ; mMaxVirtualSize = virtual_size; mAdditionalDecodePriority = 0.f ; mNeedsGLTexture = needs_gltexture ; @@ -621,7 +652,7 @@ void LLViewerTexture::resetTextureStats() { mMaxVirtualSize = 0.0f ; mAdditionalDecodePriority = 0.f ; - mNeedsResetMaxVirtualSize = FALSE ; + mMaxVirtualSizeResetCounter = 0 ; } //virtual @@ -1098,6 +1129,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mIsMissingAsset = FALSE; mLoadedCallbackDesiredDiscardLevel = 0; + mPauseLoadedCallBacks = TRUE ; mNeedsCreateTexture = FALSE; @@ -1144,6 +1176,7 @@ S8 LLViewerFetchedTexture::getType() const return LLViewerTexture::FETCHED_TEXTURE ; } +//virtual void LLViewerFetchedTexture::cleanup() { for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); @@ -1153,6 +1186,7 @@ void LLViewerFetchedTexture::cleanup() // 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 ); + entryp->removeTexture(this) ; delete entryp; } mLoadedCallbackList.clear(); @@ -1164,6 +1198,8 @@ void LLViewerFetchedTexture::cleanup() mCachedRawDiscardLevel = -1 ; mCachedRawImageReady = FALSE ; mSavedRawImage = NULL ; + + LLViewerTexture::cleanup(); } void LLViewerFetchedTexture::setForSculpt() @@ -1529,6 +1565,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() F32 pixel_priority = fsqrtf(mMaxVirtualSize); F32 priority = 0.f; + if (mIsMissingAsset) { priority = 0.0f; @@ -1550,7 +1587,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() { priority = 1.f; } - else if (pixel_priority <= 0.f && !have_all_data) + else if (pixel_priority < 0.001f && !have_all_data) { // Not on screen but we might want some data if (mBoostLevel > BOOST_HIGH) @@ -1558,11 +1595,6 @@ F32 LLViewerFetchedTexture::calcDecodePriority() // Always want high boosted images priority = 1.f; } - else if(mForceToSaveRawImage) - { - //force to fetch the raw image. - priority = 1.f; - } else { priority = -5.f; //stop fetching @@ -1665,7 +1697,7 @@ void LLViewerFetchedTexture::setAdditionalDecodePriority(F32 priority) void LLViewerFetchedTexture::updateVirtualSize() { - if(mNeedsResetMaxVirtualSize) + if(!mMaxVirtualSizeResetCounter) { addTextureStats(0.f, FALSE) ;//reset } @@ -1685,9 +1717,9 @@ void LLViewerFetchedTexture::updateVirtualSize() } } - if(mCanResetMaxVirtualSize) + if(mMaxVirtualSizeResetCounter > 0) { - mNeedsResetMaxVirtualSize = TRUE ; + mMaxVirtualSizeResetCounter--; } reorganizeFaceList() ; reorganizeVolumeList(); @@ -1765,6 +1797,7 @@ bool LLViewerFetchedTexture::updateFetch() if (finished) { mIsFetching = FALSE; + mLastPacketTimer.reset() ; } else { @@ -1794,6 +1827,7 @@ bool LLViewerFetchedTexture::updateFetch() setIsMissingAsset(); mRawDiscardLevel = INVALID_DISCARD_LEVEL ; mIsFetching = FALSE ; + mLastPacketTimer.reset(); } else { @@ -1961,6 +1995,7 @@ void LLViewerFetchedTexture::setIsMissingAsset() LLAppViewer::getTextureFetch()->deleteRequest(getID(), true); mHasFetcher = FALSE; mIsFetching = FALSE; + mLastPacketTimer.reset(); mFetchState = 0; mFetchPriority = 0; } @@ -1968,7 +2003,8 @@ void LLViewerFetchedTexture::setIsMissingAsset() } void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_callback, - S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, void* userdata) + S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, void* userdata, void* src, + LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, BOOL pause) { // // Don't do ANYTHING here, just add it to the global callback list @@ -1984,12 +2020,17 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call mLoadedCallbackDesiredDiscardLevel = llmin(mLoadedCallbackDesiredDiscardLevel, (S8)discard_level) ; } - LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata); - mLoadedCallbackList.push_back(entryp); + if(mPauseLoadedCallBacks && !pause) + { + unpauseLoadedCallbacks(src) ; + } + LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata, src_callback_list, src, this, pause); + mLoadedCallbackList.push_back(entryp); + mNeedsAux |= needs_aux; if(keep_imageraw) { - forceToSaveRawImage(discard_level) ; + forceToSaveRawImage(discard_level, true) ; } if (mNeedsAux && mAuxRawImage.isNull() && getDiscardLevel() >= 0) { @@ -1998,6 +2039,113 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call } } +void LLViewerFetchedTexture::deleteCallbackEntry(void* src) +{ + if(mLoadedCallbackList.empty()) + { + return ; + } + + S32 desired_discard = INVALID_DISCARD_LEVEL ; + S32 desired_raw_discard = INVALID_DISCARD_LEVEL ; + for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); + iter != mLoadedCallbackList.end(); ) + { + LLLoadedCallbackEntry *entryp = *iter; + if(entryp->mSource == src) + { + // 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) ; + } + else + { + ++iter; + + desired_discard = llmin(desired_discard, entryp->mDesiredDiscard) ; + if(entryp->mNeedsImageRaw) + { + desired_raw_discard = llmin(desired_raw_discard, entryp->mDesiredDiscard) ; + } + } + } + + mLoadedCallbackDesiredDiscardLevel = desired_discard; + if (mLoadedCallbackList.empty()) + { + // If we have no callbacks, take us off of the image callback list. + gTextureList.mCallbackList.erase(this); + mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; + + if(mForceToSaveRawImage) + { + destroySavedRawImage() ; + } + } + else if(mForceToSaveRawImage && mBoostLevel != LLViewerTexture::BOOST_PREVIEW) + { + if(desired_raw_discard != INVALID_DISCARD_LEVEL) + { + mDesiredSavedRawDiscardLevel = desired_raw_discard ; + } + else + { + destroySavedRawImage() ; + } + } +} + +void LLViewerFetchedTexture::unpauseLoadedCallbacks(void* src) +{ + BOOL need_raw = FALSE ; + for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); + iter != mLoadedCallbackList.end(); ) + { + LLLoadedCallbackEntry *entryp = *iter++; + if(entryp->mSource == src) + { + entryp->mPaused = FALSE ; + if(entryp->mNeedsImageRaw) + { + need_raw = TRUE ; + } + } + } + mPauseLoadedCallBacks = FALSE ; + if(need_raw) + { + mForceToSaveRawImage = TRUE ; + } +} + +void LLViewerFetchedTexture::pauseLoadedCallbacks(void* src) +{ + bool paused = true ; + + for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); + iter != mLoadedCallbackList.end(); ) + { + LLLoadedCallbackEntry *entryp = *iter++; + if(entryp->mSource == src) + { + entryp->mPaused = TRUE ; + } + else if(!entryp->mPaused) + { + paused = false ; + } + } + + if(paused) + { + mPauseLoadedCallBacks = TRUE ;//when set, loaded callback is paused. + resetTextureStats(); + mForceToSaveRawImage = FALSE ; + } +} + bool LLViewerFetchedTexture::doLoadedCallbacks() { if (mNeedsCreateTexture) @@ -2023,6 +2171,11 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() // Remove ourself from the global list of textures with callbacks gTextureList.mCallbackList.erase(this); } + if(mPauseLoadedCallBacks) + { + destroyRawImage(); + return res; //paused + } S32 gl_discard = getDiscardLevel(); @@ -2432,10 +2585,12 @@ void LLViewerFetchedTexture::saveRawImage() mLastReferencedSavedRawImageTime = sCurrentTime ; } -void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard) +void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard, bool from_callback) { if(!mForceToSaveRawImage || mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard) { + llassert_always(from_callback || mBoostLevel == LLViewerTexture::BOOST_PREVIEW) ; + mForceToSaveRawImage = TRUE ; mDesiredSavedRawDiscardLevel = desired_discard ; @@ -2882,7 +3037,7 @@ void LLViewerMediaTexture::removeMediaImplFromTexture(const LLUUID& media_id) } //static -void LLViewerMediaTexture::cleanup() +void LLViewerMediaTexture::cleanUpClass() { sMediaMap.clear() ; } @@ -3291,7 +3446,7 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() } mUpdateVirtualSizeTime = LLFrameTimer::getFrameCount() ; - if(mNeedsResetMaxVirtualSize) + if(!mMaxVirtualSizeResetCounter) { addTextureStats(0.f, FALSE) ;//reset } @@ -3324,9 +3479,9 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() } } - if(mCanResetMaxVirtualSize) + if(mMaxVirtualSizeResetCounter > 0) { - mNeedsResetMaxVirtualSize = TRUE ; + mMaxVirtualSizeResetCounter--; } reorganizeFaceList() ; reorganizeVolumeList(); diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 361f56e02f..8b69408e4b 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -66,17 +66,32 @@ class LLVOVolume ; class LLLoadedCallbackEntry { +public: + typedef std::set< LLUUID > source_callback_list_t; + public: LLLoadedCallbackEntry(loaded_callback_func cb, S32 discard_level, BOOL need_imageraw, // Needs image raw for the callback - void* userdata ); + void* userdata, + source_callback_list_t* src_callback_list, + void* source, + LLViewerFetchedTexture* target, + BOOL pause); + ~LLLoadedCallbackEntry(); + void removeTexture(LLViewerFetchedTexture* tex) ; loaded_callback_func mCallback; S32 mLastUsedDiscard; S32 mDesiredDiscard; BOOL mNeedsImageRaw; + BOOL mPaused; void* mUserData; + source_callback_list_t* mSourceCallbackList; + void* mSource; + +public: + static void cleanUpCallbackList(LLLoadedCallbackEntry::source_callback_list_t* callback_list, void* src) ; }; class LLTextureBar; @@ -103,22 +118,23 @@ public: enum EBoostLevel { BOOST_NONE = 0, - BOOST_AVATAR_BAKED = 1, - BOOST_AVATAR = 2, - BOOST_CLOUDS = 3, - BOOST_SCULPTED = 4, + BOOST_AVATAR_BAKED , + BOOST_AVATAR , + BOOST_CLOUDS , + BOOST_SCULPTED , BOOST_HIGH = 10, - BOOST_TERRAIN = 11, // has to be high priority for minimap / low detail - BOOST_SELECTED = 12, - BOOST_HUD = 13, - BOOST_AVATAR_BAKED_SELF = 14, - BOOST_ICON = 15, - BOOST_UI = 16, - BOOST_PREVIEW = 17, - BOOST_MAP = 18, - BOOST_MAP_VISIBLE = 19, - BOOST_AVATAR_SELF = 20, // needed for baking avatar + BOOST_BUMP , + BOOST_TERRAIN , // has to be high priority for minimap / low detail + BOOST_SELECTED , + BOOST_HUD , + BOOST_AVATAR_BAKED_SELF , + BOOST_ICON , + BOOST_UI , + BOOST_PREVIEW , + BOOST_MAP , + BOOST_MAP_VISIBLE , + BOOST_AVATAR_SELF , // needed for baking avatar BOOST_MAX_LEVEL, //other texture Categories @@ -144,7 +160,6 @@ protected: public: static void initClass(); - static void cleanupClass(); static void updateClass(const F32 velocity, const F32 angular_velocity) ; LLViewerTexture(BOOL usemipmaps = TRUE); @@ -166,7 +181,8 @@ public: void addTextureStats(F32 virtual_size, BOOL needs_gltexture = TRUE) const; void resetTextureStats(); - void setResetMaxVirtualSizeFlag(bool flag) ; + void setMaxVirtualSizeResetInterval(S32 interval)const {mMaxVirtualSizeResetInterval = interval;} + void resetMaxVirtualSizeResetCounter()const {mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval;} virtual F32 getMaxVirtualSize() ; @@ -248,7 +264,7 @@ public: /*virtual*/ void updateBindStatsForTester() ; protected: - void cleanup() ; + virtual void cleanup() ; void init(bool firstinit) ; void reorganizeFaceList() ; void reorganizeVolumeList() ; @@ -264,10 +280,10 @@ protected: S32 mFullHeight; BOOL mUseMipMaps ; S8 mComponents; - bool mCanResetMaxVirtualSize; - mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need? mutable S8 mNeedsGLTexture; - mutable BOOL mNeedsResetMaxVirtualSize ; + mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need? + mutable S32 mMaxVirtualSizeResetCounter ; + mutable S32 mMaxVirtualSizeResetInterval; mutable F32 mAdditionalDecodePriority; // priority add to mDecodePriority. LLFrameTimer mLastReferencedTimer; @@ -368,10 +384,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* userdata); + S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, void* src, + 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); bool doLoadedCallbacks(); + void deleteCallbackEntry(void* src); void addToCreateTexture(); @@ -449,7 +468,7 @@ public: S32 getCachedRawImageLevel() const {return mCachedRawDiscardLevel;} BOOL isCachedRawImageReady() const {return mCachedRawImageReady ;} BOOL isRawImageValid()const { return mIsRawImageValid ; } - void forceToSaveRawImage(S32 desired_discard = 0) ; + void forceToSaveRawImage(S32 desired_discard = 0, bool from_callback = false) ; /*virtual*/ void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ; void destroySavedRawImage() ; LLImageRaw* getSavedRawImage() ; @@ -466,7 +485,7 @@ protected: private: void init(bool firstinit) ; - void cleanup() ; + /*virtual*/ void cleanup() ; void saveRawImage() ; void setCachedRawImage() ; @@ -515,6 +534,7 @@ protected: typedef std::list callback_list_t; S8 mLoadedCallbackDesiredDiscardLevel; + BOOL mPauseLoadedCallBacks; callback_list_t mLoadedCallbackList; LLPointer mRawImage; @@ -638,7 +658,7 @@ private: public: static void updateClass() ; - static void cleanup() ; + static void cleanUpClass() ; static LLViewerMediaTexture* findMediaTexture(const LLUUID& media_id) ; static void removeMediaImplFromTexture(const LLUUID& media_id) ; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 1e3311dafe..b3aff30324 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1219,7 +1219,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d delete [] data; return; } - image->getLastPacketTimer()->reset(); + //image->getLastPacketTimer()->reset(); bool res = LLAppViewer::getTextureFetch()->receiveImageHeader(msg->getSender(), id, codec, packets, totalbytes, data_size, data); if (!res) { @@ -1283,7 +1283,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d delete [] data; return; } - image->getLastPacketTimer()->reset(); + //image->getLastPacketTimer()->reset(); bool res = LLAppViewer::getTextureFetch()->receiveImagePacket(msg->getSender(), id, packet_num, data_size, data); if (!res) { @@ -1406,7 +1406,7 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st datap->mImageName = name; datap->mImageScaleRegion = scale_rect; - imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap); + imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap, NULL, NULL); return new_imagep; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 316588c982..86e07c3126 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -677,7 +677,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mFullyLoaded(FALSE), mPreviousFullyLoaded(FALSE), mFullyLoadedInitialized(FALSE), - mSupportsAlphaLayers(FALSE) + mSupportsAlphaLayers(FALSE), + mLoadedCallbacksPaused(FALSE) { LLMemType mt(LLMemType::MTYPE_AVATAR); //VTResume(); // VTune @@ -847,6 +848,7 @@ void LLVOAvatar::markDead() sNumVisibleChatBubbles--; } mVoiceVisualizer->markDead(); + LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList, this) ; LLViewerObject::markDead(); } @@ -2227,12 +2229,14 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { llinfos << "Warning! Idle on dead avatar" << llendl; return TRUE; - } + } if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR))) { return TRUE; } + + checkTextureLoading() ; // force immediate pixel area update on avatars using last frames data (before drawable or camera updates) setPixelAreaAndAngle(gAgent); @@ -4138,6 +4142,7 @@ void LLVOAvatar::updateTextures() { render_avatar = isVisible() && !mCulled; } + checkTextureLoading() ; std::vector layer_baked; // GL NOT ACTIVE HERE - *TODO @@ -4178,7 +4183,7 @@ void LLVOAvatar::updateTextures() } } } - if (isIndexBakedTexture((ETextureIndex) texture_index)) + if (isIndexBakedTexture((ETextureIndex) texture_index) && render_avatar) { const S32 boost_level = getAvatarBakedBoostLevel(); imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE); @@ -4194,7 +4199,7 @@ void LLVOAvatar::updateTextures() << " on host " << getRegion()->getHost() << llendl; } - addBakedTextureStats( imagep, mPixelArea, texel_area_ratio, boost_level ); + addBakedTextureStats( imagep, mPixelArea, texel_area_ratio, boost_level ); } } @@ -4218,13 +4223,65 @@ void LLVOAvatar::addLocalTextureStats( ETextureIndex idx, LLViewerFetchedTexture } +void LLVOAvatar::checkTextureLoading() +{ + static const F32 MAX_INVISIBLE_WAITING_TIME = 30.f ; //seconds + + BOOL pause = !isVisible() ; + if(mLoadedCallbacksPaused == pause) + { + return ; + } + + if(mCallbackTextureList.empty()) + { + mLoadedCallbacksPaused = pause ; + return ; //nothing to check. + } + + if(!pause) + { + mInvisibleTimer.reset() ; + } + if(pause && mInvisibleTimer.getElapsedTimeF32() < MAX_INVISIBLE_WAITING_TIME) + { + return ; + } + + for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = mCallbackTextureList.begin(); + iter != mCallbackTextureList.end(); ++iter) + { + LLViewerFetchedTexture* tex = gTextureList.findImage(*iter) ; + if(tex) + { + if(pause)//pause texture fetching. + { + tex->pauseLoadedCallbacks(this) ; + } + else//unpause + { + static const F32 START_AREA = 100.f ; + + tex->unpauseLoadedCallbacks(this) ; + tex->addTextureStats(START_AREA); //jump satrt the fetching again + } + } + } + + mLoadedCallbacksPaused = pause ; + return ; +} + void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level) { - mMaxPixelArea = llmax(pixel_area, mMaxPixelArea); - mMinPixelArea = llmin(pixel_area, mMinPixelArea); + static const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 512 ; //frames + imagep->resetTextureStats(); - imagep->setResetMaxVirtualSizeFlag(false) ; imagep->setCanUseHTTP(false) ; //turn off http fetching for baked textures. + imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); + + mMaxPixelArea = llmax(pixel_area, mMaxPixelArea); + mMinPixelArea = llmin(pixel_area, mMinPixelArea); imagep->addTextureStats(pixel_area / texel_area_ratio); imagep->setBoostLevel(boost_level); if(boost_level == LLViewerTexture::BOOST_AVATAR_BAKED_SELF) @@ -6144,6 +6201,15 @@ 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 ; + } std::vector is_layer_baked; is_layer_baked.resize(mBakedTextureDatas.size(), false); @@ -6214,10 +6280,12 @@ void LLVOAvatar::updateMeshTextures() { mBakedTextureDatas[i].mIsLoaded = FALSE; 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 )); + { + baked_img->setLoadedCallback(onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ), + callback_src, src_callback_list, paused); } - baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ) ); + baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ), + callback_src, src_callback_list, paused ); } } else if (mBakedTextureDatas[i].mTexLayerSet @@ -6677,6 +6745,16 @@ 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 ; + } + for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { const BOOL layer_baked = isTextureDefined(mBakedTextureDatas[i].mTextureIndex); @@ -6690,9 +6768,11 @@ void LLVOAvatar::onFirstTEMessageReceived() // If we have more than one texture for the other baked layers, we'll want to call this for them too. 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 )); + image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ), + callback_src, src_callback_list, paused); } - image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ) ); + image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ), + callback_src, src_callback_list, paused ); } } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 4259bb8e73..3dad919875 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -263,6 +263,8 @@ private: S32 mFullyLoadedFrameCounter; LLFrameTimer mFullyLoadedTimer; LLFrameTimer mRuthTimer; +protected: + LLFrameTimer mInvisibleTimer; /** State ** ** @@ -499,7 +501,8 @@ protected: }; typedef std::vector bakedtexturedata_vec_t; bakedtexturedata_vec_t mBakedTextureDatas; - + LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; + BOOL mLoadedCallbacksPaused; //-------------------------------------------------------------------- // Local Textures //-------------------------------------------------------------------- @@ -519,7 +522,7 @@ private: virtual const LLTextureEntry* getTexEntry(const U8 te_num) const; virtual void setTexEntry(const U8 index, const LLTextureEntry &te); - + void checkTextureLoading() ; //-------------------------------------------------------------------- // Layers //-------------------------------------------------------------------- diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 982d9c375c..4edbbb7402 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1632,8 +1632,8 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te } } else - { - tex->setLoadedCallback(onLocalTextureLoaded, desired_discard, TRUE, FALSE, new LLAvatarTexData(getID(), type)); + { + tex->setLoadedCallback(onLocalTextureLoaded, desired_discard, TRUE, FALSE, new LLAvatarTexData(getID(), type), NULL, NULL); } } tex->setMinDiscardLevel(desired_discard); @@ -2032,7 +2032,7 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe imagep->setBoostLevel(getAvatarBoostLevel()); imagep->resetTextureStats(); - imagep->setResetMaxVirtualSizeFlag(false) ; + imagep->setMaxVirtualSizeResetInterval(16); imagep->addTextureStats( desired_pixels / texel_area_ratio ); imagep->setAdditionalDecodePriority(1.0f) ; imagep->forceUpdateBindStats() ; diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 2eb233ddd9..c74782162b 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -106,6 +106,7 @@ LLWearable::LLWearable(const LLAssetID& asset_id) : LLWearable::~LLWearable() { + LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList, this) ; } const std::string& LLWearable::getTypeLabel() const @@ -444,8 +445,8 @@ BOOL LLWearable::importFile( LLFILE* file ) delete mSavedTEMap[te]; } - image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(id, (LLVOAvatarDefines::ETextureIndex)te)); - + image->setBoostLevel(LLViewerTexture::BOOST_AVATAR_SELF) ; + image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(id, (LLVOAvatarDefines::ETextureIndex)te), this, &mCallbackTextureList); LLUUID textureid(text_buffer); mTEMap[te] = new LLLocalTextureObject(image, textureid); diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index 6b6067fd27..34a231c4bb 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -165,6 +165,7 @@ private: te_map_t mTEMap; // maps TE to LocalTextureObject te_map_t mSavedTEMap; // last saved version of TEMap LLUUID mItemID; // ID of the inventory item in the agent's inventory + LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; }; #endif // LL_LLWEARABLE_H -- cgit v1.3 From 0ba75fe2d6fe8eddd6efaaf8e6c604ea96bb30c0 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 13 Jul 2010 13:40:08 -0600 Subject: EXT-7400: FIXED: 2.0.2 texture queue gets jammed; EXT-7399: FIXED: 2.0.2 with http textures loads textures slower than 1.23.5 --- indra/llcommon/llqueuedthread.cpp | 5 +-- indra/newview/llviewertexture.cpp | 71 ++++++++++++++++++++++++++++----------- indra/newview/llviewertexture.h | 13 +++---- indra/newview/llvoavatar.cpp | 13 +++++-- indra/newview/llvoavatar.h | 1 + indra/newview/llvoavatarself.cpp | 2 +- 6 files changed, 73 insertions(+), 32 deletions(-) (limited to 'indra/newview/llviewertexture.cpp') diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index 809a626c93..e0b56b7973 100644 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -428,9 +428,11 @@ S32 LLQueuedThread::processNextRequest() llassert_always(req->getStatus() == STATUS_QUEUED); break; } + U32 start_priority = 0 ; if (req) { req->setStatus(STATUS_INPROGRESS); + start_priority = req->getPriority(); } unlockData(); @@ -439,8 +441,7 @@ S32 LLQueuedThread::processNextRequest() // safe to access req. if (req) { - // process request - U32 start_priority = req->getPriority(); + // process request bool complete = req->processRequest(); if (complete) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0afbce7d51..75bb9f84e2 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -495,6 +495,7 @@ LLViewerTexture::LLViewerTexture(const U32 width, const U32 height, const U8 com mFullHeight = height ; mUseMipMaps = usemipmaps ; mComponents = components ; + setTexelsPerImage(); mID.generate(); sImageCount++; @@ -522,6 +523,7 @@ void LLViewerTexture::init(bool firstinit) mFullWidth = 0; mFullHeight = 0; + mTexelsPerImage = 0 ; mUseMipMaps = FALSE ; mComponents = 0 ; @@ -530,7 +532,7 @@ void LLViewerTexture::init(bool firstinit) mMaxVirtualSize = 0.f; mNeedsGLTexture = FALSE ; mMaxVirtualSizeResetInterval = 1; - mMaxVirtualSizeResetCounter = 1 ; + mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval ; mAdditionalDecodePriority = 0.f ; mParcelMedia = NULL ; mNumFaces = 0 ; @@ -838,7 +840,8 @@ BOOL LLViewerTexture::createGLTexture(S32 discard_level, const LLImageRaw* image { mFullWidth = mGLTexturep->getCurrentWidth() ; mFullHeight = mGLTexturep->getCurrentHeight() ; - mComponents = mGLTexturep->getComponents() ; + mComponents = mGLTexturep->getComponents() ; + setTexelsPerImage(); } return ret ; @@ -1056,9 +1059,16 @@ void LLViewerTexture::destroyGLTexture() } } +void LLViewerTexture::setTexelsPerImage() +{ + S32 fullwidth = llmin(mFullWidth,(S32)MAX_IMAGE_SIZE_DEFAULT); + S32 fullheight = llmin(mFullHeight,(S32)MAX_IMAGE_SIZE_DEFAULT); + mTexelsPerImage = (F32)fullwidth * fullheight; +} + BOOL LLViewerTexture::isLargeImage() { - return mFullWidth * mFullHeight > LLViewerTexture::sMinLargeImageSize ; + return (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize ; } //virtual @@ -1415,6 +1425,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) mFullWidth = mRawImage->getWidth(); mFullHeight = mRawImage->getHeight(); + setTexelsPerImage(); } else { @@ -1619,11 +1630,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() { // priority range = 100,000 - 500,000 S32 desired_discard = mDesiredDiscardLevel; - if (getDontDiscard()) - { - desired_discard -= 2; - } - else if (!isJustBound() && mCachedRawImageReady) + if (!isJustBound() && mCachedRawImageReady) { if(mBoostLevel < BOOST_HIGH) { @@ -1639,7 +1646,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() S32 ddiscard = cur_discard - desired_discard; ddiscard = llclamp(ddiscard, -1, MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY); - priority = (ddiscard + 1) * PRIORITY_DELTA_DISCARD_LEVEL_FACTOR; + priority = (ddiscard + 1) * PRIORITY_DELTA_DISCARD_LEVEL_FACTOR; } // Priority Formula: @@ -1647,19 +1654,51 @@ F32 LLViewerFetchedTexture::calcDecodePriority() // [10,000,000] + [1,000,000-9,000,000] + [100,000-500,000] + [1-20,000] + [0-999] if (priority > 0.0f) { + bool large_enough = mCachedRawImageReady && ((S32)mTexelsPerImage > sMinLargeImageSize) ; + if(large_enough) + { + //Note: + //to give small, low-priority textures some chance to be fetched, + //cut the priority in half if the texture size is larger than 256 * 256 and has a 64*64 ready. + priority *= 0.5f ; + } + pixel_priority = llclamp(pixel_priority, 0.0f, MAX_PRIORITY_PIXEL); priority += pixel_priority + PRIORITY_BOOST_LEVEL_FACTOR * mBoostLevel; if ( mBoostLevel > BOOST_HIGH) { - priority += PRIORITY_BOOST_HIGH_FACTOR; + if(mBoostLevel > BOOST_SUPER_HIGH) + { + //for very important textures, always grant the highest priority. + priority += PRIORITY_BOOST_HIGH_FACTOR; + } + else if(mCachedRawImageReady) + { + //Note: + //to give small, low-priority textures some chance to be fetched, + //if high priority texture has a 64*64 ready, lower its fetching priority. + setAdditionalDecodePriority(0.5f) ; + } + else + { + priority += PRIORITY_BOOST_HIGH_FACTOR; + } } if(mAdditionalDecodePriority > 0.0f) { // priority range += 1,000,000.f-9,000,000.f - priority += PRIORITY_ADDITIONAL_FACTOR * (1.0 + mAdditionalDecodePriority * MAX_ADDITIONAL_LEVEL_FOR_PRIORITY); + F32 additional = PRIORITY_ADDITIONAL_FACTOR * (1.0 + mAdditionalDecodePriority * MAX_ADDITIONAL_LEVEL_FOR_PRIORITY); + if(large_enough) + { + //Note: + //to give small, low-priority textures some chance to be fetched, + //cut the additional priority to a quarter if the texture size is larger than 256 * 256 and has a 64*64 ready. + additional *= 0.25f ; + } + priority += additional; } } return priority; @@ -1702,11 +1741,6 @@ void LLViewerFetchedTexture::updateVirtualSize() addTextureStats(0.f, FALSE) ;//reset } - if(mForceToSaveRawImage) - { - setAdditionalDecodePriority(0.75f) ; //boost the fetching priority - } - for(U32 i = 0 ; i < mNumFaces ; i++) { LLFace* facep = mFaceList[i] ; @@ -1819,6 +1853,7 @@ bool LLViewerFetchedTexture::updateFetch() { mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; mFullHeight = mRawImage->getHeight() << mRawDiscardLevel; + setTexelsPerImage(); if(mFullWidth > MAX_IMAGE_SIZE || mFullHeight > MAX_IMAGE_SIZE) { @@ -2887,10 +2922,6 @@ void LLViewerLODTexture::processTextureStats() //static const F64 log_2 = log(2.0); static const F64 log_4 = log(4.0); - S32 fullwidth = llmin(mFullWidth,(S32)MAX_IMAGE_SIZE_DEFAULT); - S32 fullheight = llmin(mFullHeight,(S32)MAX_IMAGE_SIZE_DEFAULT); - mTexelsPerImage = (F32)fullwidth * fullheight; - F32 discard_level = 0.f; // If we know the output width and height, we can force the discard diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 8b69408e4b..b33d04e8dd 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -126,15 +126,16 @@ public: BOOST_HIGH = 10, BOOST_BUMP , BOOST_TERRAIN , // has to be high priority for minimap / low detail - BOOST_SELECTED , - BOOST_HUD , + BOOST_SELECTED , BOOST_AVATAR_BAKED_SELF , + BOOST_AVATAR_SELF , // needed for baking avatar + BOOST_SUPER_HIGH , //textures higher than this need to be downloaded at the required resolution without delay. + BOOST_HUD , BOOST_ICON , BOOST_UI , BOOST_PREVIEW , BOOST_MAP , - BOOST_MAP_VISIBLE , - BOOST_AVATAR_SELF , // needed for baking avatar + BOOST_MAP_VISIBLE , BOOST_MAX_LEVEL, //other texture Categories @@ -268,6 +269,7 @@ protected: void init(bool firstinit) ; void reorganizeFaceList() ; void reorganizeVolumeList() ; + void setTexelsPerImage(); private: //note: do not make this function public. /*virtual*/ LLImageGL* getGLTexture() const ; @@ -280,6 +282,7 @@ protected: S32 mFullHeight; BOOL mUseMipMaps ; S8 mComponents; + F32 mTexelsPerImage; // Texels per image. mutable S8 mNeedsGLTexture; mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need? mutable S32 mMaxVirtualSizeResetCounter ; @@ -598,8 +601,6 @@ private: void scaleDown() ; private: - - F32 mTexelsPerImage; // Texels per image. F32 mDiscardVirtualSize; // Virtual size used to calculate desired discard F32 mCalculatedDiscardLevel; // Last calculated discard level }; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1954a573d4..1193471ccc 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4272,10 +4272,12 @@ void LLVOAvatar::checkTextureLoading() return ; } +const F32 SELF_ADDITIONAL_PRI = 0.75f ; +const F32 ADDITIONAL_PRI = 0.5f; void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level) { //if this function is not called for the last 512 frames, the texture pipeline will stop fetching this texture. - static const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 512 ; //frames + static const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 512 ; //frames imagep->resetTextureStats(); imagep->setCanUseHTTP(false) ; //turn off http fetching for baked textures. @@ -4285,9 +4287,14 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel mMinPixelArea = llmin(pixel_area, mMinPixelArea); imagep->addTextureStats(pixel_area / texel_area_ratio); imagep->setBoostLevel(boost_level); - if(boost_level == LLViewerTexture::BOOST_AVATAR_BAKED_SELF) + + if(boost_level != LLViewerTexture::BOOST_AVATAR_BAKED_SELF) + { + imagep->setAdditionalDecodePriority(ADDITIONAL_PRI) ; + } + else { - imagep->setAdditionalDecodePriority(1.0f) ; + imagep->setAdditionalDecodePriority(SELF_ADDITIONAL_PRI) ; } } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 3dad919875..a86e824426 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -1048,5 +1048,6 @@ protected: // Shared with LLVOAvatarSelf *******************************************************************************/ }; // LLVOAvatar +extern const F32 SELF_ADDITIONAL_PRI; #endif // LL_VO_AVATAR_H diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 4edbbb7402..b80e47e11a 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2034,7 +2034,7 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe imagep->resetTextureStats(); imagep->setMaxVirtualSizeResetInterval(16); imagep->addTextureStats( desired_pixels / texel_area_ratio ); - imagep->setAdditionalDecodePriority(1.0f) ; + imagep->setAdditionalDecodePriority(SELF_ADDITIONAL_PRI) ; imagep->forceUpdateBindStats() ; if (imagep->getDiscardLevel() < 0) { -- cgit v1.3 From 5d85dad85f07ea23b3a2892276d8ac591a966864 Mon Sep 17 00:00:00 2001 From: Dessie Linden Date: Thu, 15 Jul 2010 12:31:08 -0700 Subject: Reverted changeset 2bb10eae42bf --- doc/contributions.txt | 1 - indra/llcharacter/llkeyframemotion.cpp | 6 - indra/llcommon/llqueuedthread.cpp | 5 +- indra/llui/llaccordionctrl.cpp | 5 +- indra/llui/llbutton.cpp | 1 - indra/llui/llflatlistview.cpp | 30 +-- indra/llui/llflatlistview.h | 12 +- indra/llui/llnotifications.cpp | 11 +- indra/llui/lltextbase.cpp | 56 +---- indra/llui/lltextbase.h | 18 +- indra/llui/lltexteditor.cpp | 2 + indra/llui/lluictrl.cpp | 7 +- indra/llui/lluictrlfactory.h | 2 +- indra/llui/lluistring.cpp | 13 +- indra/llui/llview.h | 7 +- indra/llui/llviewquery.cpp | 14 +- indra/llui/llviewquery.h | 2 +- indra/newview/app_settings/settings.xml | 17 +- indra/newview/llagent.cpp | 3 - indra/newview/llagentwearablesfetch.cpp | 2 +- indra/newview/llappearancemgr.cpp | 24 +- indra/newview/llavatarlist.cpp | 2 +- indra/newview/llchiclet.cpp | 4 +- indra/newview/llcofwearables.cpp | 28 +-- indra/newview/llcofwearables.h | 4 - indra/newview/lldndbutton.cpp | 2 +- indra/newview/lldndbutton.h | 2 +- indra/newview/llexpandabletextbox.cpp | 8 +- indra/newview/llfolderview.h | 1 - indra/newview/llimview.cpp | 8 - indra/newview/llinspectobject.cpp | 3 +- indra/newview/llinventoryfunctions.cpp | 13 - indra/newview/llinventoryfunctions.h | 36 +-- indra/newview/llinventoryitemslist.cpp | 8 +- indra/newview/llinventorylistitem.cpp | 93 ++----- indra/newview/llinventorylistitem.h | 31 +-- indra/newview/lllocationinputctrl.cpp | 2 +- indra/newview/llpanelgenerictip.cpp | 6 +- indra/newview/llpanelmaininventory.cpp | 11 +- indra/newview/llpanelonlinestatus.cpp | 5 +- indra/newview/llpaneloutfitedit.cpp | 127 ++-------- indra/newview/llpaneloutfitedit.h | 9 +- indra/newview/llparticipantlist.cpp | 2 +- indra/newview/llpreviewtexture.cpp | 6 +- indra/newview/llpreviewtexture.h | 8 +- indra/newview/llscriptfloater.cpp | 27 +- indra/newview/llscriptfloater.h | 5 - indra/newview/llsidetray.cpp | 14 +- indra/newview/llsidetray.h | 14 +- indra/newview/llsyswellwindow.cpp | 4 +- indra/newview/lltexturectrl.cpp | 4 - indra/newview/llurllineeditorctrl.cpp | 5 +- indra/newview/llviewerinventory.cpp | 15 -- indra/newview/llviewerinventory.h | 9 +- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llviewerobject.cpp | 7 - indra/newview/llviewerstats.cpp | 8 - indra/newview/llviewerstats.h | 55 ----- indra/newview/llviewertexture.cpp | 71 ++---- indra/newview/llviewertexture.h | 13 +- indra/newview/llvoavatar.cpp | 34 ++- indra/newview/llvoavatar.h | 3 +- indra/newview/llvoavatarself.cpp | 2 +- indra/newview/llwearableitemslist.cpp | 186 ++++---------- indra/newview/llwearableitemslist.h | 58 ++--- indra/newview/llwindebug.cpp | 61 ++--- indra/newview/pipeline.cpp | 2 +- .../default/xui/da/floater_publish_classified.xml | 2 +- .../skins/default/xui/da/menu_cof_clothing.xml | 3 +- .../skins/default/xui/da/menu_inventory.xml | 3 +- .../default/xui/da/menu_inventory_gear_default.xml | 3 +- .../skins/default/xui/da/menu_outfit_gear.xml | 1 - .../default/xui/da/menu_wearable_list_item.xml | 3 +- .../newview/skins/default/xui/da/notifications.xml | 12 +- .../skins/default/xui/da/panel_outfit_edit.xml | 10 +- .../default/xui/da/panel_outfits_inventory.xml | 10 +- .../skins/default/xui/da/panel_outfits_list.xml | 7 - .../skins/default/xui/da/panel_outfits_wearing.xml | 6 - .../skins/default/xui/da/sidepanel_item_info.xml | 10 +- .../skins/default/xui/da/sidepanel_task_info.xml | 2 +- indra/newview/skins/default/xui/da/strings.xml | 15 +- .../skins/default/xui/de/floater_buy_currency.xml | 2 +- .../default/xui/de/floater_publish_classified.xml | 2 +- .../skins/default/xui/de/floater_voice_effect.xml | 2 +- .../skins/default/xui/de/menu_inventory.xml | 3 +- .../default/xui/de/menu_inventory_gear_default.xml | 3 +- .../skins/default/xui/de/menu_outfit_gear.xml | 1 - .../default/xui/de/menu_wearable_list_item.xml | 3 +- .../newview/skins/default/xui/de/notifications.xml | 12 +- .../skins/default/xui/de/panel_navigation_bar.xml | 4 +- .../skins/default/xui/de/panel_outfit_edit.xml | 10 +- .../default/xui/de/panel_outfits_inventory.xml | 10 +- .../skins/default/xui/de/panel_outfits_list.xml | 7 - .../skins/default/xui/de/panel_outfits_wearing.xml | 6 - .../skins/default/xui/de/sidepanel_appearance.xml | 2 +- .../skins/default/xui/de/sidepanel_item_info.xml | 18 +- .../skins/default/xui/de/sidepanel_task_info.xml | 2 +- indra/newview/skins/default/xui/de/strings.xml | 15 +- .../skins/default/xui/en/floater_camera.xml | 15 +- .../skins/default/xui/en/menu_inventory_add.xml | 9 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 16 +- .../newview/skins/default/xui/en/notifications.xml | 5 +- .../skins/default/xui/en/panel_nearby_media.xml | 2 - .../skins/default/xui/en/panel_outfits_list.xml | 4 +- indra/newview/skins/default/xui/en/strings.xml | 7 +- .../default/xui/en/widgets/bodyparts_list_item.xml | 73 ------ .../default/xui/en/widgets/clothing_list_item.xml | 93 ------- .../en/widgets/deletable_wearable_list_item.xml | 43 ---- .../xui/en/widgets/dummy_clothing_list_item.xml | 52 ---- .../default/xui/en/widgets/inventory_list_item.xml | 35 +-- .../default/xui/es/floater_publish_classified.xml | 2 +- .../skins/default/xui/es/menu_cof_clothing.xml | 3 +- .../skins/default/xui/es/menu_inventory.xml | 3 +- .../default/xui/es/menu_inventory_gear_default.xml | 3 +- .../skins/default/xui/es/menu_outfit_gear.xml | 1 - .../default/xui/es/menu_wearable_list_item.xml | 3 +- .../newview/skins/default/xui/es/notifications.xml | 12 +- .../skins/default/xui/es/panel_outfit_edit.xml | 10 +- .../default/xui/es/panel_outfits_inventory.xml | 10 +- .../skins/default/xui/es/panel_outfits_list.xml | 7 - .../skins/default/xui/es/panel_outfits_wearing.xml | 6 - .../skins/default/xui/es/sidepanel_item_info.xml | 10 +- .../skins/default/xui/es/sidepanel_task_info.xml | 2 +- indra/newview/skins/default/xui/es/strings.xml | 15 +- .../skins/default/xui/fr/floater_bulk_perms.xml | 2 +- .../default/xui/fr/floater_publish_classified.xml | 2 +- .../skins/default/xui/fr/menu_cof_clothing.xml | 3 +- .../skins/default/xui/fr/menu_gesture_gear.xml | 2 +- .../skins/default/xui/fr/menu_inventory.xml | 3 +- .../default/xui/fr/menu_inventory_gear_default.xml | 3 +- .../skins/default/xui/fr/menu_outfit_gear.xml | 1 - .../default/xui/fr/menu_wearable_list_item.xml | 3 +- .../newview/skins/default/xui/fr/notifications.xml | 16 +- .../skins/default/xui/fr/panel_group_general.xml | 2 +- .../skins/default/xui/fr/panel_outfit_edit.xml | 10 +- .../default/xui/fr/panel_outfits_inventory.xml | 10 +- .../skins/default/xui/fr/panel_outfits_list.xml | 7 - .../skins/default/xui/fr/panel_outfits_wearing.xml | 6 - .../default/xui/fr/panel_preferences_general.xml | 2 +- .../skins/default/xui/fr/sidepanel_item_info.xml | 18 +- indra/newview/skins/default/xui/fr/strings.xml | 15 +- .../skins/default/xui/it/floater_about_land.xml | 10 +- .../skins/default/xui/it/floater_buy_currency.xml | 6 +- .../default/xui/it/floater_publish_classified.xml | 2 +- .../skins/default/xui/it/menu_cof_clothing.xml | 3 +- .../skins/default/xui/it/menu_inventory.xml | 3 +- .../default/xui/it/menu_inventory_gear_default.xml | 3 +- .../skins/default/xui/it/menu_outfit_gear.xml | 1 - .../default/xui/it/menu_wearable_list_item.xml | 3 +- .../newview/skins/default/xui/it/notifications.xml | 12 +- .../skins/default/xui/it/panel_outfit_edit.xml | 10 +- .../default/xui/it/panel_outfits_inventory.xml | 10 +- .../skins/default/xui/it/panel_outfits_list.xml | 7 - .../skins/default/xui/it/panel_outfits_wearing.xml | 6 - .../newview/skins/default/xui/it/panel_people.xml | 2 +- .../skins/default/xui/it/sidepanel_item_info.xml | 10 +- indra/newview/skins/default/xui/it/strings.xml | 15 +- .../default/xui/ja/floater_publish_classified.xml | 2 +- .../skins/default/xui/ja/menu_cof_clothing.xml | 3 +- .../skins/default/xui/ja/menu_inventory.xml | 3 +- .../default/xui/ja/menu_inventory_gear_default.xml | 3 +- .../skins/default/xui/ja/menu_outfit_gear.xml | 1 - .../default/xui/ja/menu_wearable_list_item.xml | 3 +- .../newview/skins/default/xui/ja/notifications.xml | 12 +- .../skins/default/xui/ja/panel_outfit_edit.xml | 10 +- .../default/xui/ja/panel_outfits_inventory.xml | 10 +- .../skins/default/xui/ja/panel_outfits_list.xml | 7 - .../skins/default/xui/ja/panel_outfits_wearing.xml | 6 - .../skins/default/xui/ja/sidepanel_item_info.xml | 18 +- indra/newview/skins/default/xui/ja/strings.xml | 15 +- .../newview/skins/default/xui/pl/floater_about.xml | 15 +- .../skins/default/xui/pl/floater_about_land.xml | 3 - .../default/xui/pl/floater_animation_preview.xml | 48 ++-- .../default/xui/pl/floater_avatar_textures.xml | 72 +++--- .../default/xui/pl/floater_buy_currency_html.xml | 2 - .../skins/default/xui/pl/floater_camera.xml | 21 +- .../default/xui/pl/floater_day_cycle_options.xml | 43 ++-- .../skins/default/xui/pl/floater_god_tools.xml | 9 +- .../skins/default/xui/pl/floater_image_preview.xml | 20 +- .../skins/default/xui/pl/floater_incoming_call.xml | 8 +- indra/newview/skins/default/xui/pl/floater_map.xml | 5 +- .../skins/default/xui/pl/floater_moveview.xml | 36 +-- .../skins/default/xui/pl/floater_outgoing_call.xml | 2 +- .../default/xui/pl/floater_preview_gesture.xml | 8 +- .../default/xui/pl/floater_preview_notecard.xml | 4 +- .../default/xui/pl/floater_publish_classified.xml | 2 +- .../skins/default/xui/pl/floater_snapshot.xml | 44 ++-- .../newview/skins/default/xui/pl/floater_tools.xml | 15 +- indra/newview/skins/default/xui/pl/floater_tos.xml | 12 +- .../default/xui/pl/floater_voice_controls.xml | 8 +- .../skins/default/xui/pl/floater_voice_effect.xml | 30 --- .../skins/default/xui/pl/inspect_object.xml | 11 +- .../skins/default/xui/pl/menu_attachment_other.xml | 2 +- .../skins/default/xui/pl/menu_attachment_self.xml | 7 +- .../skins/default/xui/pl/menu_avatar_other.xml | 2 +- .../skins/default/xui/pl/menu_avatar_self.xml | 5 +- .../skins/default/xui/pl/menu_bottomtray.xml | 5 - .../skins/default/xui/pl/menu_cof_attachment.xml | 4 - .../skins/default/xui/pl/menu_cof_body_part.xml | 5 - .../skins/default/xui/pl/menu_cof_clothing.xml | 6 - .../newview/skins/default/xui/pl/menu_cof_gear.xml | 5 - indra/newview/skins/default/xui/pl/menu_edit.xml | 12 - .../skins/default/xui/pl/menu_hide_navbar.xml | 1 - .../default/xui/pl/menu_inspect_avatar_gear.xml | 2 +- .../default/xui/pl/menu_inspect_self_gear.xml | 3 +- .../default/xui/pl/menu_inv_offer_chiclet.xml | 4 - .../skins/default/xui/pl/menu_inventory.xml | 6 +- .../default/xui/pl/menu_inventory_gear_default.xml | 3 +- indra/newview/skins/default/xui/pl/menu_login.xml | 16 +- .../skins/default/xui/pl/menu_outfit_gear.xml | 27 -- .../skins/default/xui/pl/menu_outfit_tab.xml | 9 - .../skins/default/xui/pl/menu_participant_list.xml | 5 +- .../skins/default/xui/pl/menu_save_outfit.xml | 5 - .../skins/default/xui/pl/menu_script_chiclet.xml | 4 - .../skins/default/xui/pl/menu_topinfobar.xml | 7 - indra/newview/skins/default/xui/pl/menu_viewer.xml | 36 +-- .../default/xui/pl/menu_wearable_list_item.xml | 14 -- .../skins/default/xui/pl/menu_wearing_gear.xml | 4 - .../skins/default/xui/pl/menu_wearing_tab.xml | 4 - .../newview/skins/default/xui/pl/notifications.xml | 225 ++--------------- .../skins/default/xui/pl/outfit_accordion_tab.xml | 4 - .../default/xui/pl/panel_body_parts_list_item.xml | 8 - .../xui/pl/panel_bodyparts_list_button_bar.xml | 5 - .../skins/default/xui/pl/panel_bottomtray.xml | 23 +- .../xui/pl/panel_clothing_list_button_bar.xml | 5 - .../default/xui/pl/panel_clothing_list_item.xml | 9 - .../skins/default/xui/pl/panel_cof_wearables.xml | 8 - .../xui/pl/panel_deletable_wearable_list_item.xml | 5 - .../xui/pl/panel_dummy_clothing_list_item.xml | 7 - .../skins/default/xui/pl/panel_edit_eyes.xml | 8 +- .../skins/default/xui/pl/panel_edit_gloves.xml | 8 +- .../skins/default/xui/pl/panel_edit_hair.xml | 14 +- .../skins/default/xui/pl/panel_edit_jacket.xml | 8 +- .../skins/default/xui/pl/panel_edit_pants.xml | 8 +- .../skins/default/xui/pl/panel_edit_shape.xml | 41 ++-- .../skins/default/xui/pl/panel_edit_shirt.xml | 8 +- .../skins/default/xui/pl/panel_edit_shoes.xml | 8 +- .../skins/default/xui/pl/panel_edit_skin.xml | 14 +- .../skins/default/xui/pl/panel_edit_skirt.xml | 8 +- .../skins/default/xui/pl/panel_edit_socks.xml | 8 +- .../skins/default/xui/pl/panel_edit_tattoo.xml | 1 - .../skins/default/xui/pl/panel_edit_underpants.xml | 8 +- .../skins/default/xui/pl/panel_edit_undershirt.xml | 8 +- .../skins/default/xui/pl/panel_edit_wearable.xml | 13 +- .../skins/default/xui/pl/panel_group_general.xml | 5 +- .../default/xui/pl/panel_group_land_money.xml | 3 - .../skins/default/xui/pl/panel_group_notices.xml | 1 - .../default/xui/pl/panel_im_control_panel.xml | 2 +- .../skins/default/xui/pl/panel_inventory_item.xml | 4 - indra/newview/skins/default/xui/pl/panel_login.xml | 9 +- .../skins/default/xui/pl/panel_main_inventory.xml | 66 ++++- .../xui/pl/panel_media_settings_permissions.xml | 9 - .../skins/default/xui/pl/panel_nearby_media.xml | 26 +- .../skins/default/xui/pl/panel_outfit_edit.xml | 51 ---- .../default/xui/pl/panel_outfits_inventory.xml | 15 +- .../skins/default/xui/pl/panel_outfits_list.xml | 7 - .../skins/default/xui/pl/panel_outfits_wearing.xml | 6 - .../newview/skins/default/xui/pl/panel_people.xml | 37 ++- .../newview/skins/default/xui/pl/panel_places.xml | 7 +- .../default/xui/pl/panel_preferences_advanced.xml | 5 - .../default/xui/pl/panel_preferences_chat.xml | 1 - .../default/xui/pl/panel_preferences_graphics1.xml | 4 +- .../skins/default/xui/pl/panel_status_bar.xml | 6 +- .../skins/default/xui/pl/panel_voice_effect.xml | 15 -- .../skins/default/xui/pl/panel_world_map.xml | 6 - .../skins/default/xui/pl/sidepanel_appearance.xml | 10 +- .../skins/default/xui/pl/sidepanel_inventory.xml | 8 +- .../skins/default/xui/pl/sidepanel_item_info.xml | 14 +- .../skins/default/xui/pl/sidepanel_task_info.xml | 2 +- indra/newview/skins/default/xui/pl/strings.xml | 271 ++------------------- .../default/xui/pt/floater_preview_gesture.xml | 22 +- .../default/xui/pt/floater_publish_classified.xml | 2 +- .../newview/skins/default/xui/pt/floater_tools.xml | 44 ++-- .../skins/default/xui/pt/floater_voice_effect.xml | 2 +- .../skins/default/xui/pt/floater_world_map.xml | 8 +- .../skins/default/xui/pt/menu_cof_clothing.xml | 3 +- .../skins/default/xui/pt/menu_inventory.xml | 11 +- .../default/xui/pt/menu_inventory_gear_default.xml | 3 +- .../skins/default/xui/pt/menu_outfit_gear.xml | 1 - .../default/xui/pt/menu_wearable_list_item.xml | 3 +- .../newview/skins/default/xui/pt/notifications.xml | 12 +- .../skins/default/xui/pt/panel_landmark_info.xml | 16 +- .../skins/default/xui/pt/panel_outfit_edit.xml | 10 +- .../default/xui/pt/panel_outfits_inventory.xml | 10 +- .../skins/default/xui/pt/panel_outfits_list.xml | 7 - .../skins/default/xui/pt/panel_outfits_wearing.xml | 6 - .../skins/default/xui/pt/panel_place_profile.xml | 16 +- .../default/xui/pt/panel_preferences_privacy.xml | 4 +- .../newview/skins/default/xui/pt/role_actions.xml | 4 +- .../skins/default/xui/pt/sidepanel_item_info.xml | 10 +- .../skins/default/xui/pt/sidepanel_task_info.xml | 2 +- indra/newview/skins/default/xui/pt/strings.xml | 15 +- 292 files changed, 1076 insertions(+), 2995 deletions(-) delete mode 100644 indra/newview/skins/default/xui/da/panel_outfits_list.xml delete mode 100644 indra/newview/skins/default/xui/da/panel_outfits_wearing.xml delete mode 100644 indra/newview/skins/default/xui/de/panel_outfits_list.xml delete mode 100644 indra/newview/skins/default/xui/de/panel_outfits_wearing.xml delete mode 100644 indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml delete mode 100644 indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml delete mode 100644 indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml delete mode 100644 indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml delete mode 100644 indra/newview/skins/default/xui/es/panel_outfits_list.xml delete mode 100644 indra/newview/skins/default/xui/es/panel_outfits_wearing.xml delete mode 100644 indra/newview/skins/default/xui/fr/panel_outfits_list.xml delete mode 100644 indra/newview/skins/default/xui/fr/panel_outfits_wearing.xml delete mode 100644 indra/newview/skins/default/xui/it/panel_outfits_list.xml delete mode 100644 indra/newview/skins/default/xui/it/panel_outfits_wearing.xml delete mode 100644 indra/newview/skins/default/xui/ja/panel_outfits_list.xml delete mode 100644 indra/newview/skins/default/xui/ja/panel_outfits_wearing.xml delete mode 100644 indra/newview/skins/default/xui/pl/floater_buy_currency_html.xml delete mode 100644 indra/newview/skins/default/xui/pl/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_cof_attachment.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_cof_body_part.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_cof_clothing.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_cof_gear.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_edit.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_inv_offer_chiclet.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_outfit_gear.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_outfit_tab.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_save_outfit.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_script_chiclet.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_topinfobar.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_wearable_list_item.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_wearing_gear.xml delete mode 100644 indra/newview/skins/default/xui/pl/menu_wearing_tab.xml delete mode 100644 indra/newview/skins/default/xui/pl/outfit_accordion_tab.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_body_parts_list_item.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_bodyparts_list_button_bar.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_clothing_list_button_bar.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_clothing_list_item.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_cof_wearables.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_deletable_wearable_list_item.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_dummy_clothing_list_item.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_inventory_item.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_outfit_edit.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_outfits_list.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_outfits_wearing.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/pt/panel_outfits_list.xml delete mode 100644 indra/newview/skins/default/xui/pt/panel_outfits_wearing.xml (limited to 'indra/newview/llviewertexture.cpp') diff --git a/doc/contributions.txt b/doc/contributions.txt index c8125c675f..8c6bd5e0fe 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -517,7 +517,6 @@ Ringo Tuxing Robin Cornelius SNOW-108 SNOW-204 - SNOW-484 VWR-2488 VWR-9557 VWR-11128 diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 7bc9e97eb1..f4dc3b927b 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1248,12 +1248,6 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) return FALSE; } - if(mJointMotionList->mEmoteName==mID.asString()) - { - llwarns << "Malformed animation mEmoteName==mID" << llendl; - return FALSE; - } - //------------------------------------------------------------------------- // get loop //------------------------------------------------------------------------- diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index e0b56b7973..809a626c93 100644 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -428,11 +428,9 @@ S32 LLQueuedThread::processNextRequest() llassert_always(req->getStatus() == STATUS_QUEUED); break; } - U32 start_priority = 0 ; if (req) { req->setStatus(STATUS_INPROGRESS); - start_priority = req->getPriority(); } unlockData(); @@ -441,7 +439,8 @@ S32 LLQueuedThread::processNextRequest() // safe to access req. if (req) { - // process request + // process request + U32 start_priority = req->getPriority(); bool complete = req->processRequest(); if (complete) diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 673631f99a..28125ccaaf 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -40,6 +40,8 @@ #include "llfocusmgr.h" #include "lllocalcliprect.h" +#include "lltrans.h" + #include "boost/bind.hpp" static const S32 DRAGGER_BAR_MARGIN = 4; @@ -72,6 +74,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) { initNoTabsWidget(params.no_matched_tabs_text); + mNoVisibleTabsOrigString = LLTrans::getString(params.no_visible_tabs_text.initial_value().asString()); mSingleExpansion = params.single_expansion; if(mFitParent && !mSingleExpansion) { @@ -386,7 +389,7 @@ void LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params) { LLTextBox::Params tp = tb_params; tp.rect(getLocalRect()); - mNoMatchedTabsOrigString = tp.initial_value().asString(); + mNoMatchedTabsOrigString = LLTrans::getString(tp.initial_value().asString()); mNoVisibleTabsHelpText = LLUICtrlFactory::create(tp, this); } diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index aeedf62379..39e46a7ccb 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -1,4 +1,3 @@ - /** * @file llbutton.cpp * @brief LLButton base class diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 3c79da64f9..6eb214cb93 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -157,7 +157,7 @@ bool LLFlatListView::insertItemAfter(LLPanel* after_item, LLPanel* item_to_add, } -bool LLFlatListView::removeItem(LLPanel* item, bool rearrange) +bool LLFlatListView::removeItem(LLPanel* item) { if (!item) return false; if (item->getParent() != mItemsPanel) return false; @@ -165,22 +165,22 @@ bool LLFlatListView::removeItem(LLPanel* item, bool rearrange) item_pair_t* item_pair = getItemPair(item); if (!item_pair) return false; - return removeItemPair(item_pair, rearrange); + return removeItemPair(item_pair); } -bool LLFlatListView::removeItemByValue(const LLSD& value, bool rearrange) +bool LLFlatListView::removeItemByValue(const LLSD& value) { if (value.isUndefined()) return false; item_pair_t* item_pair = getItemPair(value); if (!item_pair) return false; - return removeItemPair(item_pair, rearrange); + return removeItemPair(item_pair); } -bool LLFlatListView::removeItemByUUID(const LLUUID& uuid, bool rearrange) +bool LLFlatListView::removeItemByUUID(const LLUUID& uuid) { - return removeItemByValue(LLSD(uuid), rearrange); + return removeItemByValue(LLSD(uuid)); } LLPanel* LLFlatListView::getItemByValue(const LLSD& value) const @@ -327,9 +327,6 @@ U32 LLFlatListView::size(const bool only_visible_items) const void LLFlatListView::clear() { - // This will clear mSelectedItemPairs, calling all appropriate callbacks. - resetSelection(); - // do not use LLView::deleteAllChildren to avoid removing nonvisible items. drag-n-drop for ex. for (pairs_iterator_t it = mItemPairs.begin(); it != mItemPairs.end(); ++it) { @@ -338,6 +335,7 @@ void LLFlatListView::clear() delete *it; } mItemPairs.clear(); + mSelectedItemPairs.clear(); // also set items panel height to zero. Reshape it to allow reshaping of non-item children LLRect rc = mItemsPanel->getRect(); @@ -972,12 +970,11 @@ bool LLFlatListView::isSelected(item_pair_t* item_pair) const return std::find(mSelectedItemPairs.begin(), it_end, item_pair) != it_end; } -bool LLFlatListView::removeItemPair(item_pair_t* item_pair, bool rearrange) +bool LLFlatListView::removeItemPair(item_pair_t* item_pair) { llassert(item_pair); bool deleted = false; - bool selection_changed = false; for (pairs_iterator_t it = mItemPairs.begin(); it != mItemPairs.end(); ++it) { item_pair_t* _item_pair = *it; @@ -997,7 +994,6 @@ bool LLFlatListView::removeItemPair(item_pair_t* item_pair, bool rearrange) if (selected_item_pair == item_pair) { it = mSelectedItemPairs.erase(it); - selection_changed = true; break; } } @@ -1006,16 +1002,8 @@ bool LLFlatListView::removeItemPair(item_pair_t* item_pair, bool rearrange) item_pair->first->die(); delete item_pair; - if (rearrange) - { rearrangeItems(); notifyParentItemsRectChanged(); - } - - if (selection_changed && mCommitOnSelectionChange) - { - onCommit(); - } return true; } @@ -1111,7 +1099,7 @@ void LLFlatListView::onFocusReceived() { if (size()) { - mSelectedItemsBorder->setVisible(TRUE); + mSelectedItemsBorder->setVisible(TRUE); } gEditMenuHandler = this; } diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 50d06fbc94..ded46d8122 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -117,9 +117,6 @@ public: Params(); }; - // disable traversal when finding widget to hand focus off to - /*virtual*/ BOOL canFocusChildren() const { return FALSE; } - /** * Connects callback to signal called when Return key is pressed. */ @@ -152,19 +149,19 @@ public: * Remove specified item * @return true if the item was removed, false otherwise */ - virtual bool removeItem(LLPanel* item, bool rearrange = true); + virtual bool removeItem(LLPanel* item); /** * Remove an item specified by value * @return true if the item was removed, false otherwise */ - virtual bool removeItemByValue(const LLSD& value, bool rearrange = true); + virtual bool removeItemByValue(const LLSD& value); /** * Remove an item specified by uuid * @return true if the item was removed, false otherwise */ - virtual bool removeItemByUUID(const LLUUID& uuid, bool rearrange = true); + virtual bool removeItemByUUID(const LLUUID& uuid); /** * Get an item by value @@ -265,7 +262,6 @@ public: void setAllowSelection(bool can_select) { mAllowSelection = can_select; } /** Sets flag whether onCommit should be fired if selection was changed */ - // FIXME: this should really be a separate signal, since "Commit" implies explicit user action, and selection changes can happen more indirectly. void setCommitOnSelectionChange(bool b) { mCommitOnSelectionChange = b; } /** Get number of selected items in the list */ @@ -353,7 +349,7 @@ protected: virtual bool isSelected(item_pair_t* item_pair) const; - virtual bool removeItemPair(item_pair_t* item_pair, bool rearrange); + virtual bool removeItemPair(item_pair_t* item_pair); /** * Notify parent about changed size of internal controls with "size_changes" action diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 9e272a0949..621e72ce38 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -34,7 +34,6 @@ #include "llnotifications.h" -#include "llinstantmessage.h" #include "llxmlnode.h" #include "lluictrl.h" #include "lluictrlfactory.h" @@ -42,7 +41,6 @@ #include "llsdserialize.h" #include "lltrans.h" #include "llnotificationslistener.h" -#include "llstring.h" #include #include @@ -1489,14 +1487,7 @@ std::ostream& operator<<(std::ostream& s, const LLNotification& notification) void LLPostponedNotification::onCachedNameReceived(const LLUUID& id, const std::string& first, const std::string& last, bool is_group) { - mName = first + " " + last; - - LLStringUtil::trim(mName); - if (mName.empty()) - { - llwarns << "Empty name received for Id: " << id << llendl; - mName = SYSTEM_FROM; - } + gCacheName->getFullName(id, mName); modifyNotificationParams(); LLNotifications::instance().add(mParams); cleanup(); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index ed03645944..223998569b 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -66,10 +66,7 @@ bool LLTextBase::compare_segment_end::operator()(const LLTextSegmentPtr& a, cons { return a->getStart() < b->getStart(); } - else - { - return a->getEnd() < b->getEnd(); - } + return a->getEnd() < b->getEnd(); } @@ -177,7 +174,7 @@ LLTextBase::Params::Params() LLTextBase::LLTextBase(const LLTextBase::Params &p) : LLUICtrl(p, LLTextViewModelPtr(new LLTextViewModel)), - mURLClickSignal(NULL), + mURLClickSignal(), mMaxTextByteLength( p.max_text_length ), mDefaultFont(p.font), mFontShadow(p.font_shadow), @@ -212,8 +209,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mParseHTML(p.allow_html), mParseHighlights(p.parse_highlights), mBGVisible(p.bg_visible), - mScroller(NULL), - mStyleDirty(true) + mScroller(NULL) { if(p.allow_scroll) { @@ -252,8 +248,9 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) LLTextBase::~LLTextBase() { + // Menu, like any other LLUICtrl, is deleted by its parent - gMenuHolder + mSegments.clear(); - delete mURLClickSignal; } void LLTextBase::initFromParams(const LLTextBase::Params& p) @@ -299,18 +296,13 @@ bool LLTextBase::truncate() return did_truncate; } -const LLStyle::Params& LLTextBase::getDefaultStyleParams() +LLStyle::Params LLTextBase::getDefaultStyleParams() { - if (mStyleDirty) - { - mDefaultStyle - .color(LLUIColor(&mFgColor)) - .readonly_color(LLUIColor(&mReadOnlyFgColor)) - .font(mDefaultFont) - .drop_shadow(mFontShadow); - mStyleDirty = false; - } - return mDefaultStyle; + return LLStyle::Params() + .color(LLUIColor(&mFgColor)) + .readonly_color(LLUIColor(&mReadOnlyFgColor)) + .font(mDefaultFont) + .drop_shadow(mFontShadow); } void LLTextBase::onValueChange(S32 start, S32 end) @@ -869,12 +861,11 @@ BOOL LLTextBase::handleMouseUp(S32 x, S32 y, MASK mask) if (cur_segment && cur_segment->handleMouseUp(x, y, mask)) { // Did we just click on a link? - if (mURLClickSignal - && cur_segment->getStyle() + if (cur_segment->getStyle() && cur_segment->getStyle()->isLink()) { // *TODO: send URL here? - (*mURLClickSignal)(this, LLSD() ); + mURLClickSignal(this, LLSD() ); } return TRUE; } @@ -1048,14 +1039,12 @@ void LLTextBase::draw() void LLTextBase::setColor( const LLColor4& c ) { mFgColor = c; - mStyleDirty = true; } //virtual void LLTextBase::setReadOnlyColor(const LLColor4 &c) { mReadOnlyFgColor = c; - mStyleDirty = true; } //virtual @@ -1499,22 +1488,12 @@ void LLTextBase::getSegmentAndOffset( S32 startpos, segment_set_t::iterator* seg LLTextBase::segment_set_t::iterator LLTextBase::getSegIterContaining(S32 index) { - if (index > getLength()) { return mSegments.end(); } - - // when there are no segments, we return the end iterator, which must be checked by caller - if (mSegments.size() <= 1) { return mSegments.begin(); } - segment_set_t::iterator it = mSegments.upper_bound(new LLIndexSegment(index)); return it; } LLTextBase::segment_set_t::const_iterator LLTextBase::getSegIterContaining(S32 index) const { - if (index > getLength()) { return mSegments.end(); } - - // when there are no segments, we return the end iterator, which must be checked by caller - if (mSegments.size() <= 1) { return mSegments.begin(); } - LLTextBase::segment_set_t::const_iterator it = mSegments.upper_bound(new LLIndexSegment(index)); return it; } @@ -2345,15 +2324,6 @@ LLRect LLTextBase::getVisibleDocumentRect() const } } -boost::signals2::connection LLTextBase::setURLClickedCallback(const commit_signal_t::slot_type& cb) -{ - if (!mURLClickSignal) - { - mURLClickSignal = new commit_signal_t(); - } - return mURLClickSignal->connect(cb); -} - // // LLTextSegment // diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 4b0eeeb7d6..300ee0f05f 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -361,7 +361,10 @@ public: virtual void appendLineBreakSegment(const LLStyle::Params& style_params); virtual void appendImageSegment(const LLStyle::Params& style_params); virtual void appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo); - boost::signals2::connection setURLClickedCallback(const commit_signal_t::slot_type& cb); + +public: + // Fired when a URL link is clicked + commit_signal_t mURLClickSignal; protected: // helper structs @@ -454,7 +457,7 @@ protected: void createDefaultSegment(); virtual void updateSegments(); void insertSegment(LLTextSegmentPtr segment_to_insert); - const LLStyle::Params& getDefaultStyleParams(); + LLStyle::Params getDefaultStyleParams(); // manage lines S32 getLineStart( S32 line ) const; @@ -494,12 +497,6 @@ protected: LLRect mVisibleTextRect; // The rect in which text is drawn. Excludes borders. LLRect mTextBoundingRect; - // default text style - LLStyle::Params mDefaultStyle; - bool mStyleDirty; - const LLFontGL* const mDefaultFont; // font that is used when none specified, can only be set by constructor - const LLFontGL::ShadowType mFontShadow; // shadow style, can only be set by constructor - // colors LLUIColor mCursorColor; LLUIColor mFgColor; @@ -526,6 +523,8 @@ protected: LLFontGL::VAlign mVAlign; F32 mLineSpacingMult; // multiple of line height used as space for a single line of text (e.g. 1.5 to get 50% padding) S32 mLineSpacingPixels; // padding between lines + const LLFontGL* mDefaultFont; // font that is used when none specified + LLFontGL::ShadowType mFontShadow; bool mBorderVisible; bool mParseHTML; // make URLs interactive bool mParseHighlights; // highlight user-defined keywords @@ -548,9 +547,6 @@ protected: bool mScrollNeeded; // need to change scroll region because of change to cursor position S32 mScrollIndex; // index of first character to keep visible in scroll region - // Fired when a URL link is clicked - commit_signal_t* mURLClickSignal; - }; #endif diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 130cda3784..c9474d66b7 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -264,6 +264,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mContextMenu(NULL), mShowContextMenu(p.show_context_menu) { + mDefaultFont = p.font; + mSourceID.generate(); //FIXME: use image? diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index ff330f863a..3ade46d367 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -675,7 +675,7 @@ BOOL LLUICtrl::getIsChrome() const class CompareByDefaultTabGroup: public LLCompareByTabOrder { public: - CompareByDefaultTabGroup(const LLView::child_tab_order_t& order, S32 default_tab_group): + CompareByDefaultTabGroup(LLView::child_tab_order_t order, S32 default_tab_group): LLCompareByTabOrder(order), mDefaultTabGroup(default_tab_group) {} private: @@ -699,16 +699,13 @@ class LLUICtrl::DefaultTabGroupFirstSorter : public LLQuerySorter, public LLSing { public: /*virtual*/ void operator() (LLView * parent, viewList_t &children) const - { + { children.sort(CompareByDefaultTabGroup(parent->getCtrlOrder(), parent->getDefaultTabGroup())); } }; -LLFastTimer::DeclareTimer FTM_FOCUS_FIRST_ITEM("Focus First Item"); - BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash) { - LLFastTimer _(FTM_FOCUS_FIRST_ITEM); // try to select default tab group child LLCtrlQuery query = getTabOrderQuery(); // sort things such that the default tab group is at the front diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index dc43b311a7..c99acee48e 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -182,7 +182,7 @@ public: void popFactoryFunctions(); template - static T* createWidget(const typename T::Params& params, LLView* parent = NULL) + static T* createWidget(typename T::Params& params, LLView* parent = NULL) { T* widget = NULL; diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp index ac9e71665f..f7a53e87de 100644 --- a/indra/llui/lluistring.cpp +++ b/indra/llui/lluistring.cpp @@ -135,16 +135,9 @@ void LLUIString::updateResult() const mResult = mOrig; // get the defailt args + local args - if (mArgs.empty()) - { - LLStringUtil::format(mResult, LLTrans::getDefaultArgs()); - } - else - { - LLStringUtil::format_map_t combined_args = LLTrans::getDefaultArgs(); - combined_args.insert(mArgs.begin(), mArgs.end()); - LLStringUtil::format(mResult, combined_args); - } + LLStringUtil::format_map_t combined_args = LLTrans::getDefaultArgs(); + combined_args.insert(mArgs.begin(), mArgs.end()); + LLStringUtil::format(mResult, combined_args); } void LLUIString::updateWResult() const diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 8e705ed701..aba6c310f1 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -265,7 +265,7 @@ public: virtual BOOL postBuild() { return TRUE; } - const child_tab_order_t& getCtrlOrder() const { return mCtrlOrder; } + child_tab_order_t getCtrlOrder() const { return mCtrlOrder; } ctrl_list_t getCtrlList() const; ctrl_list_t getCtrlListSorted() const; @@ -620,13 +620,12 @@ public: class LLCompareByTabOrder { public: - LLCompareByTabOrder(const LLView::child_tab_order_t& order) : mTabOrder(order) {} + LLCompareByTabOrder(LLView::child_tab_order_t order) : mTabOrder(order) {} virtual ~LLCompareByTabOrder() {} bool operator() (const LLView* const a, const LLView* const b) const; private: virtual bool compareTabOrders(const LLView::tab_order_t & a, const LLView::tab_order_t & b) const { return a < b; } - // ok to store a reference, as this should only be allocated on stack during view query operations - const LLView::child_tab_order_t& mTabOrder; + LLView::child_tab_order_t mTabOrder; }; template T* LLView::getChild(const std::string& name, BOOL recurse) const diff --git a/indra/llui/llviewquery.cpp b/indra/llui/llviewquery.cpp index 1b44cc528e..bdb3d223a6 100644 --- a/indra/llui/llviewquery.cpp +++ b/indra/llui/llviewquery.cpp @@ -95,8 +95,8 @@ viewList_t LLViewQuery::run(LLView* view) const if (pre.first) { post = runFilters(view, filtered_children, mPostFilters); - } } + } if(pre.first && post.first) { @@ -119,12 +119,12 @@ void LLViewQuery::filterChildren(LLView * view, viewList_t & filtered_children) (*mSorterp)(view, views); // sort the children per the sorter } for(LLView::child_list_iter_t iter = views.begin(); - iter != views.end(); - iter++) - { - viewList_t indiv_children = this->run(*iter); - filtered_children.splice(filtered_children.end(), indiv_children); - } + iter != views.end(); + iter++) + { + viewList_t indiv_children = this->run(*iter); + filtered_children.insert(filtered_children.end(), indiv_children.begin(), indiv_children.end()); + } } filterResult_t LLViewQuery::runFilters(LLView * view, const viewList_t children, const filterList_t filters) const diff --git a/indra/llui/llviewquery.h b/indra/llui/llviewquery.h index 68af31933d..98d9bf8796 100644 --- a/indra/llui/llviewquery.h +++ b/indra/llui/llviewquery.h @@ -122,7 +122,7 @@ public: viewList_t operator () (LLView * view) const { return run(view); } // override this method to provide iteration over other types of children - virtual void filterChildren(LLView * view, viewList_t& filtered_children) const; + virtual void filterChildren(LLView * view, viewList_t & filtered_children) const; private: diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index af296f918e..d51498f6d1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4666,7 +4666,7 @@ Type String Value - http://marketplace.secondlife.com/ + https://www.xstreetsl.com/modules.php?name=Marketplace MarketplaceURL_objectFemale @@ -4721,7 +4721,7 @@ Type String Value - http://marketplace.secondlife.com + https://www.xstreetsl.com/modules.php?name=Marketplace MarketplaceURL_bodypartMale @@ -4732,7 +4732,7 @@ Type String Value - http://marketplace.secondlife.com/ + https://www.xstreetsl.com/modules.php?name=Marketplace MarketplaceURL_glovesMale @@ -11857,16 +11857,5 @@ Value 1 - TipToastMessageLineCount - - Comment - Max line count of text message on tip toast. - Persist - 1 - Type - S32 - Value - 10 - diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 72d51540ef..4e5fdb1219 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3406,9 +3406,6 @@ void LLAgent::setTeleportState(ETeleportState state) } else if(mTeleportState == TELEPORT_ARRIVING) { - // First two position updates after a teleport tend to be weird - LLViewerStats::getInstance()->mAgentPositionSnaps.mCountOfNextUpdatesToIgnore = 2; - // Let the interested parties know we've teleported. LLViewerParcelMgr::getInstance()->onTeleportFinished(false, getPositionGlobal()); } diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index d911d123f4..0a2f0e9399 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -48,7 +48,7 @@ public: virtual ~LLOrderMyOutfitsOnDestroy() { - if (!LLApp::isRunning()) + if (LLApp::isExiting()) { llwarns << "called during shutdown, skipping" << llendl; return; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a7d90ab8d3..43f6be42b6 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -995,7 +995,7 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up { removeCOFItemLinks(gAgentWearables.getWearableItemID(item_to_wear->getWearableType(), wearable_count-1), false); } - addCOFItemLink(item_to_wear, do_update, cb); + addCOFItemLink(item_to_wear, do_update); } break; case LLAssetType::AT_BODYPART: @@ -2179,19 +2179,17 @@ void LLAppearanceMgr::updateIsDirty() } else { - LLIsOfAssetType collector = LLIsOfAssetType(LLAssetType::AT_LINK); - LLInventoryModel::cat_array_t cof_cats; LLInventoryModel::item_array_t cof_items; - gInventory.collectDescendentsIf(cof, cof_cats, cof_items, - LLInventoryModel::EXCLUDE_TRASH, collector); + gInventory.collectDescendents(cof, cof_cats, cof_items, + LLInventoryModel::EXCLUDE_TRASH); LLInventoryModel::cat_array_t outfit_cats; LLInventoryModel::item_array_t outfit_items; - gInventory.collectDescendentsIf(base_outfit, outfit_cats, outfit_items, - LLInventoryModel::EXCLUDE_TRASH, collector); + gInventory.collectDescendents(base_outfit, outfit_cats, outfit_items, + LLInventoryModel::EXCLUDE_TRASH); - if(outfit_items.count() != cof_items.count()) + if(outfit_items.count() != cof_items.count() -1) { // Current outfit folder should have one more item than the outfit folder. // this one item is the link back to the outfit folder itself. @@ -2199,6 +2197,16 @@ void LLAppearanceMgr::updateIsDirty() return; } + //getting rid of base outfit folder link to simplify comparison + for (LLInventoryModel::item_array_t::iterator it = cof_items.begin(); it != cof_items.end(); ++it) + { + if (*it == base_outfit_item) + { + cof_items.erase(it); + break; + } + } + //"dirty" - also means a difference in linked UUIDs and/or a difference in wearables order (links' descriptions) std::sort(cof_items.begin(), cof_items.end(), sort_by_linked_uuid); std::sort(outfit_items.begin(), outfit_items.end(), sort_by_linked_uuid); diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 99156b9d9d..3275d784a3 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -211,7 +211,7 @@ void LLAvatarList::setDirty(bool val /*= true*/, bool force_refresh /*= false*/) void LLAvatarList::addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name) { LL_DEBUGS("Avaline") << "Adding avaline item into the list: " << item_name << "|" << item_id << ", session: " << session_id << LL_ENDL; - LLAvalineListItem* item = new LLAvalineListItem(/*hide_number=*/false); + LLAvalineListItem* item = new LLAvalineListItem; item->setAvatarId(item_id, session_id, true, false); item->setName(item_name); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 2826899cb0..6897f4ee8e 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1886,7 +1886,7 @@ void LLScriptChiclet::onMenuItemClicked(const LLSD& user_data) if("end" == action) { - LLScriptFloaterManager::instance().removeNotification(getSessionId()); + LLScriptFloaterManager::instance().onRemoveNotification(getSessionId()); } } @@ -1969,7 +1969,7 @@ void LLInvOfferChiclet::onMenuItemClicked(const LLSD& user_data) if("end" == action) { - LLScriptFloaterManager::instance().removeNotification(getSessionId()); + LLScriptFloaterManager::instance().onRemoveNotification(getSessionId()); } } diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 86d9121213..4c0f51056d 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -283,8 +283,7 @@ LLCOFWearables::LLCOFWearables() : LLPanel(), mClothingTab(NULL), mAttachmentsTab(NULL), mBodyPartsTab(NULL), - mLastSelectedTab(NULL), - mCOFVersion(-1) + mLastSelectedTab(NULL) { mClothingMenu = new CofClothingContextMenu(this); mAttachmentMenu = new CofAttachmentContextMenu(this); @@ -379,23 +378,6 @@ void LLCOFWearables::onAccordionTabStateChanged(LLUICtrl* ctrl, const LLSD& expa void LLCOFWearables::refresh() { - const LLUUID cof_id = LLAppearanceMgr::instance().getCOF(); - if (cof_id.isNull()) - { - llwarns << "COF ID cannot be NULL" << llendl; - return; - } - - LLViewerInventoryCategory* catp = gInventory.getCategory(cof_id); - if (!catp) - { - llwarns << "COF category cannot be NULL" << llendl; - return; - } - - if (mCOFVersion == catp->getVersion()) return; - mCOFVersion = catp->getVersion(); - typedef std::vector values_vector_t; typedef std::map selection_map_t; @@ -411,7 +393,7 @@ void LLCOFWearables::refresh() LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t cof_items; - gInventory.collectDescendents(cof_id, cats, cof_items, LLInventoryModel::EXCLUDE_TRASH); + gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, cof_items, LLInventoryModel::EXCLUDE_TRASH); populateAttachmentsAndBodypartsLists(cof_items); @@ -519,7 +501,7 @@ LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventory item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable); //turning on gray separator line for the last item in the items group of the same wearable type - item_panel->setSeparatorVisible(last); + item_panel->childSetVisible("wearable_type_separator_icon", last); return item_panel; } @@ -655,10 +637,10 @@ LLAssetType::EType LLCOFWearables::getExpandedAccordionAssetType() const LLAccordionCtrlTab* expanded_tab = accordion_ctrl->getExpandedTab(); return get_if_there(mTab2AssetType, expanded_tab, LLAssetType::AT_NONE); - } +} LLAssetType::EType LLCOFWearables::getSelectedAccordionAssetType() - { +{ static LLAccordionCtrl* accordion_ctrl = getChild("cof_wearables_accordion"); const LLAccordionCtrlTab* selected_tab = accordion_ctrl->getSelectedTab(); diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index d005b75eaa..0518d59df3 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -81,7 +81,6 @@ public: LLPanel* getSelectedItem(); void getSelectedItems(std::vector& selected_items) const; - /* Repopulate the COF wearables list if the COF category has been changed since the last refresh */ void refresh(); void clear(); @@ -124,9 +123,6 @@ protected: LLListContextMenu* mClothingMenu; LLListContextMenu* mAttachmentMenu; LLListContextMenu* mBodyPartMenu; - - /* COF category version since last refresh */ - S32 mCOFVersion; }; diff --git a/indra/newview/lldndbutton.cpp b/indra/newview/lldndbutton.cpp index 4f4c7dead7..22f2bb1d16 100644 --- a/indra/newview/lldndbutton.cpp +++ b/indra/newview/lldndbutton.cpp @@ -42,7 +42,7 @@ LLDragAndDropButton::Params::Params() } -LLDragAndDropButton::LLDragAndDropButton(const Params& params) +LLDragAndDropButton::LLDragAndDropButton(Params& params) : LLButton(params) { diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h index 433b3f7ff5..c888268187 100644 --- a/indra/newview/lldndbutton.h +++ b/indra/newview/lldndbutton.h @@ -54,7 +54,7 @@ public: Params(); }; - LLDragAndDropButton(const Params& params); + LLDragAndDropButton(Params& params); typedef boost::functionmInitialTargetIDs.begin(); it!=session->mInitialTargetIDs.end();++it) { diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index cb7b338e95..a2b5ffbac4 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -161,7 +161,8 @@ BOOL LLInspectObject::postBuild(void) // Hide floater when name links clicked LLTextBox* textbox = getChild("object_creator"); - textbox->setURLClickedCallback(boost::bind(&LLInspectObject::closeFloater, this, false) ); + textbox->mURLClickSignal.connect( + boost::bind(&LLInspectObject::closeFloater, this, false) ); // Hook up functionality getChild("buy_btn")->setCommitCallback( diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f20acbd016..2d11337955 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -507,19 +507,6 @@ bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) return TRUE; } -bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - if(mType == LLAssetType::AT_CATEGORY) - { - if(cat) return TRUE; - } - if(item) - { - if(item->getActualType() == mType) return TRUE; - } - return FALSE; -} - bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if(mType == LLAssetType::AT_CATEGORY) diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 4a7721098d..1c3f82c531 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -174,25 +174,6 @@ protected: LLAssetType::EType mType; }; -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLIsOfAssetType -// -// Implementation of a LLInventoryCollectFunctor which returns TRUE if -// the item or category is of asset type passed in during construction. -// Link types are treated as links, not as the types they point to. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLIsOfAssetType : public LLInventoryCollectFunctor -{ -public: - LLIsOfAssetType(LLAssetType::EType type) : mType(type) {} - virtual ~LLIsOfAssetType() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); -protected: - LLAssetType::EType mType; -}; - class LLIsTypeWithPermissions : public LLInventoryCollectFunctor { public: @@ -290,7 +271,9 @@ public: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLFindByMask +// Class LLFindNonLinksByMask +// +// //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLFindByMask : public LLInventoryCollectFunctor { @@ -399,19 +382,6 @@ public: } }; -/* Filters out items of a particular asset type */ -class LLIsTypeActual : public LLIsType -{ -public: - LLIsTypeActual(LLAssetType::EType type) : LLIsType(type) {} - virtual ~LLIsTypeActual() {} - virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) - { - if (item && item->getIsLinkType()) return false; - return LLIsType::operator()(cat, item); - } -}; - // Collect non-removable folders and items. class LLFindNonRemovableObjects : public LLInventoryCollectFunctor { diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index e01f05c0f2..fbb3774917 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -107,12 +107,9 @@ void LLInventoryItemsList::idle(void* user_data) } } -LLFastTimer::DeclareTimer FTM_INVENTORY_ITEMS_REFRESH("Inventory List Refresh"); - void LLInventoryItemsList::refresh() { - LLFastTimer _(FTM_INVENTORY_ITEMS_REFRESH); - static const unsigned ADD_LIMIT = 20; + static const unsigned ADD_LIMIT = 50; uuid_vec_t added_items; uuid_vec_t removed_items; @@ -143,8 +140,7 @@ void LLInventoryItemsList::refresh() it = removed_items.begin(); for( ; removed_items.end() != it; ++it) { - // don't filter items right away - removeItemByUUID(*it, false); + removeItemByUUID(*it); } // Filter, rearrange and notify parent about shape changes diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index e4a7a158a3..c487aa10a7 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -51,12 +51,7 @@ static const S32 WIDGET_SPACING = 3; LLPanelInventoryListItemBase::Params::Params() : default_style("default_style"), - worn_style("worn_style"), - hover_image("hover_image"), - selected_image("selected_image"), - separator_image("separator_image"), - item_icon("item_icon"), - item_name("item_name") + worn_style("worn_style") {}; LLPanelInventoryListItemBase* LLPanelInventoryListItemBase::create(LLViewerInventoryItem* item) @@ -64,10 +59,8 @@ LLPanelInventoryListItemBase* LLPanelInventoryListItemBase::create(LLViewerInven LLPanelInventoryListItemBase* list_item = NULL; if (item) { - const LLPanelInventoryListItemBase::Params& params = LLUICtrlFactory::getDefaultParams(); - list_item = new LLPanelInventoryListItemBase(item, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelInventoryListItemBase(item); + list_item->init(); } return list_item; } @@ -83,25 +76,6 @@ void LLPanelInventoryListItemBase::draw() } setNeedsRefresh(false); } - - if (mHovered && mHoverImage) - { - mHoverImage->draw(getLocalRect()); - } - - if (mSelected && mSelectedImage) - { - mSelectedImage->draw(getLocalRect()); - } - - if (mSeparatorVisible && mSeparatorImage) - { - // stretch along bottom of listitem, using image height - LLRect separator_rect = getLocalRect(); - separator_rect.mTop = mSeparatorImage->getHeight(); - mSeparatorImage->draw(separator_rect); - } - LLPanel::draw(); } @@ -160,6 +134,9 @@ void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show) BOOL LLPanelInventoryListItemBase::postBuild() { + setIconCtrl(getChild("item_icon")); + setTitleCtrl(getChild("item_name")); + LLViewerInventoryItem* inv_item = getItem(); if (inv_item) { @@ -179,18 +156,18 @@ void LLPanelInventoryListItemBase::setValue(const LLSD& value) { if (!value.isMap()) return; if (!value.has("selected")) return; - mSelected = value["selected"]; + childSetVisible("selected_icon", value["selected"]); } void LLPanelInventoryListItemBase::onMouseEnter(S32 x, S32 y, MASK mask) { - mHovered = true; + childSetVisible("hovered_icon", true); LLPanel::onMouseEnter(x, y, mask); } void LLPanelInventoryListItemBase::onMouseLeave(S32 x, S32 y, MASK mask) { - mHovered = false; + childSetVisible("hovered_icon", false); LLPanel::onMouseLeave(x, y, mask); } @@ -267,47 +244,21 @@ S32 LLPanelInventoryListItemBase::notify(const LLSD& info) return rv; } -LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem* item, const LLPanelInventoryListItemBase::Params& params) -: LLPanel(params), - mInventoryItemUUID(item ? item->getUUID() : LLUUID::null), - mIconCtrl(NULL), - mTitleCtrl(NULL), - mWidgetSpacing(WIDGET_SPACING), - mLeftWidgetsWidth(0), - mRightWidgetsWidth(0), - mNeedsRefresh(false), - mHovered(false), - mSelected(false), - mSeparatorVisible(false), - mHoverImage(params.hover_image), - mSelectedImage(params.selected_image), - mSeparatorImage(params.separator_image) +LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem* item) +: LLPanel() +, mInventoryItemUUID(item ? item->getUUID() : LLUUID::null) +, mIconCtrl(NULL) +, mTitleCtrl(NULL) +, mWidgetSpacing(WIDGET_SPACING) +, mLeftWidgetsWidth(0) +, mRightWidgetsWidth(0) +, mNeedsRefresh(false) { - LLIconCtrl::Params icon_params(params.item_icon); - applyXUILayout(icon_params, this); - - mIconCtrl = LLUICtrlFactory::create(icon_params); - if (mIconCtrl) - { - addChild(mIconCtrl); - } - else - { - mIconCtrl = dynamic_cast(LLUICtrlFactory::createDefaultWidget("item_icon")); - } - - LLTextBox::Params text_params(params.item_name); - applyXUILayout(text_params, this); +} - mTitleCtrl = LLUICtrlFactory::create(text_params); - if (mTitleCtrl) - { - addChild(mTitleCtrl); - } - else - { - mTitleCtrl = dynamic_cast(LLUICtrlFactory::createDefaultWidget("item_title")); - } +void LLPanelInventoryListItemBase::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml"); } class WidgetVisibilityChanger diff --git a/indra/newview/llinventorylistitem.h b/indra/newview/llinventorylistitem.h index 575f6aec19..f29d92d51c 100644 --- a/indra/newview/llinventorylistitem.h +++ b/indra/newview/llinventorylistitem.h @@ -41,12 +41,12 @@ // llui #include "llpanel.h" #include "llstyle.h" -#include "lliconctrl.h" -#include "lltextbox.h" // newview #include "llwearabletype.h" +class LLIconCtrl; +class LLTextBox; class LLViewerInventoryItem; /** @@ -70,11 +70,6 @@ public: { Optional default_style, worn_style; - Optional hover_image, - selected_image, - separator_image; - Optional item_icon; - Optional item_name; Params(); }; @@ -154,22 +149,30 @@ public: /** Get the associated inventory item */ LLViewerInventoryItem* getItem() const; - void setSeparatorVisible(bool visible) { mSeparatorVisible = visible; } - virtual ~LLPanelInventoryListItemBase(){} protected: - LLPanelInventoryListItemBase(LLViewerInventoryItem* item, const Params& params); + LLPanelInventoryListItemBase(LLViewerInventoryItem* item); typedef std::vector widget_array_t; + /** + * Use it from a factory function to build panel, do not build panel in constructor + */ + virtual void init(); + /** * Called after inventory item was updated, update panel widgets to reflect inventory changes. */ virtual void updateItem(const std::string& name, EItemState item_state = IS_DEFAULT); + /** setter for mIconCtrl */ + void setIconCtrl(LLIconCtrl* icon) { mIconCtrl = icon; } + /** setter for MTitleCtrl */ + void setTitleCtrl(LLTextBox* tb) { mTitleCtrl = tb; } + void setLeftWidgetsWidth(S32 width) { mLeftWidgetsWidth = width; } void setRightWidgetsWidth(S32 width) { mRightWidgetsWidth = width; } @@ -218,14 +221,6 @@ private: LLTextBox* mTitleCtrl; LLUIImagePtr mIconImage; - LLUIImagePtr mHoverImage; - LLUIImagePtr mSelectedImage; - LLUIImagePtr mSeparatorImage; - - bool mHovered; - bool mSelected; - bool mSeparatorVisible; - std::string mHighlightedText; widget_array_t mLeftSideWidgets; diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 46ebb54786..b8590d838e 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -1052,7 +1052,7 @@ void LLLocationInputCtrl::changeLocationPresentation() //needs unescaped one LLSLURL slurl; LLAgentUI::buildSLURL(slurl, false); - mTextEntry->setText(LLURI::unescape(slurl.getSLURLString())); + mTextEntry->setText(slurl.getSLURLString()); mTextEntry->selectAll(); mMaturityButton->setVisible(FALSE); diff --git a/indra/newview/llpanelgenerictip.cpp b/indra/newview/llpanelgenerictip.cpp index 8ba2e6d01c..e0658554a4 100644 --- a/indra/newview/llpanelgenerictip.cpp +++ b/indra/newview/llpanelgenerictip.cpp @@ -35,7 +35,6 @@ #include "llpanelgenerictip.h" #include "llnotifications.h" -#include "llviewercontrol.h" // for gSavedSettings LLPanelGenericTip::LLPanelGenericTip( @@ -46,8 +45,7 @@ LLPanelGenericTip::LLPanelGenericTip( childSetValue("message", notification->getMessage()); - - S32 max_line_count = gSavedSettings.getS32("TipToastMessageLineCount"); - snapToMessageHeight(getChild ("message"), max_line_count); + // set line max count to 3 in case of a very long name + snapToMessageHeight(getChild ("message"), 3); } diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 3e12f0ba9a..29ce3449d1 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -197,15 +197,14 @@ BOOL LLPanelMainInventory::postBuild() mFilterEditor->setCommitCallback(boost::bind(&LLPanelMainInventory::onFilterEdit, this, _2)); } - initListCommandsHandlers(); - // *TODO:Get the cost info from the server const std::string upload_cost("10"); - mMenuAdd->getChild("Upload Image")->setLabelArg("[COST]", upload_cost); - mMenuAdd->getChild("Upload Sound")->setLabelArg("[COST]", upload_cost); - mMenuAdd->getChild("Upload Animation")->setLabelArg("[COST]", upload_cost); - mMenuAdd->getChild("Bulk Upload")->setLabelArg("[COST]", upload_cost); + childSetLabelArg("Upload Image", "[COST]", upload_cost); + childSetLabelArg("Upload Sound", "[COST]", upload_cost); + childSetLabelArg("Upload Animation", "[COST]", upload_cost); + childSetLabelArg("Bulk Upload", "[COST]", upload_cost); + initListCommandsHandlers(); return TRUE; } diff --git a/indra/newview/llpanelonlinestatus.cpp b/indra/newview/llpanelonlinestatus.cpp index b21fd7d385..6ba015b11c 100644 --- a/indra/newview/llpanelonlinestatus.cpp +++ b/indra/newview/llpanelonlinestatus.cpp @@ -34,7 +34,6 @@ #include "llnotifications.h" #include "llpanelonlinestatus.h" -#include "llviewercontrol.h" // for gSavedSettings LLPanelOnlineStatus::LLPanelOnlineStatus( const LLNotificationPtr& notification) : @@ -55,7 +54,7 @@ LLPanelOnlineStatus::LLPanelOnlineStatus( notification, notification->getResponseTemplate())); } - S32 max_line_count = gSavedSettings.getS32("TipToastMessageLineCount"); - snapToMessageHeight(getChild ("message"), max_line_count); + // set line max count to 3 in case of a very long name + snapToMessageHeight(getChild ("message"), 3); } diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 937b794686..f8350a56ef 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -71,7 +71,6 @@ #include "llsdutil.h" #include "llsidepanelappearance.h" #include "lltoggleablemenu.h" -#include "llvoavatarself.h" #include "llwearablelist.h" #include "llwearableitemslist.h" #include "llwearabletype.h" @@ -264,7 +263,7 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() observer.addBOFReplacedCallback(boost::bind(&LLPanelOutfitEdit::updateCurrentOutfitName, this)); observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitEdit::updateVerbs, this)); observer.addOutfitLockChangedCallback(boost::bind(&LLPanelOutfitEdit::updateVerbs, this)); - observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitEdit::onCOFChanged, this)); + observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitEdit::update, this)); gAgentWearables.addLoadingStartedCallback(boost::bind(&LLPanelOutfitEdit::onOutfitChanging, this, true)); gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitEdit::onOutfitChanging, this, false)); @@ -298,9 +297,9 @@ BOOL LLPanelOutfitEdit::postBuild() mFolderViewItemTypes[FVIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK); //order is important, see EListViewItemType for order information - mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.All"), new LLFindNonLinksByMask(ALL_ITEMS_MASK))); - mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Clothing"), new LLIsTypeActual(LLAssetType::AT_CLOTHING))); - mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Bodyparts"), new LLIsTypeActual(LLAssetType::AT_BODYPART))); + mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.All"), new LLFindByMask(ALL_ITEMS_MASK))); + mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Clothing"), new LLIsType(LLAssetType::AT_CLOTHING))); + mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Bodyparts"), new LLIsType(LLAssetType::AT_BODYPART))); mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Objects"), new LLFindByMask(ATTACHMENT_MASK)));; mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("shape"), new LLFindActualWearablesOfType(LLWearableType::WT_SHAPE))); mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("skin"), new LLFindActualWearablesOfType(LLWearableType::WT_SKIN))); @@ -332,7 +331,7 @@ BOOL LLPanelOutfitEdit::postBuild() childSetCommitCallback("shop_btn_1", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL); childSetCommitCallback("shop_btn_2", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL); - setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this, _2)); + setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this)); mCOFWearables = getChild("cof_wearables_list"); mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::filterWearablesBySelectedItem, this)); @@ -348,8 +347,8 @@ BOOL LLPanelOutfitEdit::postBuild() mInventoryItemsPanel = getChild("folder_view"); mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK); mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this)); - mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this)); + mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); + mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel()); @@ -389,7 +388,7 @@ BOOL LLPanelOutfitEdit::postBuild() mWearablesListViewPanel = getChild("filtered_wearables_panel"); mWearableItemsList = getChild("list_view"); mWearableItemsList->setCommitOnSelectionChange(true); - mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this)); + mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); mWearableItemsList->setDoubleClickCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this)); mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this)); @@ -443,9 +442,6 @@ void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables) mListViewFilterCmbBox->setVisible(false); showWearablesFilter(); - - // Reset mWearableItemsList position to top. See EXT-8180. - mWearableItemsList->goToTop(); } //switching button bars @@ -587,16 +583,11 @@ void LLPanelOutfitEdit::onPlusBtnClicked(void) } } -void LLPanelOutfitEdit::onVisibilityChange(const LLSD &in_visible_chain) +void LLPanelOutfitEdit::onVisibilityChange() { showAddWearablesPanel(false); mWearableItemsList->resetSelection(); mInventoryItemsPanel->clearSelection(); - - if (in_visible_chain.asBoolean()) - { - update(); - } } void LLPanelOutfitEdit::onAddWearableClicked(void) @@ -623,52 +614,15 @@ void LLPanelOutfitEdit::onShopButtonClicked() { static LLShopURLDispatcher url_resolver; - // will contain the resultant URL std::string url; - - if (isAgentAvatarValid()) - { - // try to get wearable type from 'Add More' panel first (EXT-7639) - LLWearableType::EType type = getAddMorePanelSelectionType(); - - if (type == LLWearableType::WT_NONE) - { - type = getCOFWearablesSelectionType(); - } - - ESex sex = gAgentAvatarp->getSex(); - - // WT_INVALID comes for attachments - if (type != LLWearableType::WT_INVALID && type != LLWearableType::WT_NONE) - { - url = url_resolver.resolveURL(type, sex); - } - - if (url.empty()) - { - url = url_resolver.resolveURL(mCOFWearables->getExpandedAccordionAssetType(), sex); - } - } - else - { - llwarns << "Agent avatar is invalid" << llendl; - - // the second argument is not important in this case: generic market place will be opened - url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE); - } - - LLWeb::loadURLExternal(url); -} - -LLWearableType::EType LLPanelOutfitEdit::getCOFWearablesSelectionType() const -{ std::vector selected_items; - LLWearableType::EType type = LLWearableType::WT_NONE; - mCOFWearables->getSelectedItems(selected_items); + ESex sex = gSavedSettings.getU32("AvatarSex") ? SEX_MALE : SEX_FEMALE; + if (selected_items.size() == 1) { + LLWearableType::EType type = LLWearableType::WT_NONE; LLPanel* item = selected_items.front(); // LLPanelDummyClothingListItem is lower then LLPanelInventoryListItemBase in hierarchy tree @@ -680,45 +634,20 @@ LLWearableType::EType LLPanelOutfitEdit::getCOFWearablesSelectionType() const { type = real_item->getWearableType(); } - } - - return type; -} - -LLWearableType::EType LLPanelOutfitEdit::getAddMorePanelSelectionType() const -{ - LLWearableType::EType type = LLWearableType::WT_NONE; - - if (mAddWearablesPanel != NULL && mAddWearablesPanel->getVisible()) - { - if (mInventoryItemsPanel != NULL && mInventoryItemsPanel->getVisible()) - { - std::set selected_uuids = mInventoryItemsPanel->getRootFolder()->getSelectionList(); - if (selected_uuids.size() == 1) - { - type = getWearableTypeByItemUUID(*(selected_uuids.begin())); - } - } - else if (mWearableItemsList != NULL && mWearableItemsList->getVisible()) + // WT_INVALID comes for attachments + if (type != LLWearableType::WT_INVALID) { - std::vector selected_uuids; - mWearableItemsList->getSelectedUUIDs(selected_uuids); - - if (selected_uuids.size() == 1) - { - type = getWearableTypeByItemUUID(selected_uuids.front()); - } + url = url_resolver.resolveURL(type, sex); } } - return type; -} + if (url.empty()) + { + url = url_resolver.resolveURL(mCOFWearables->getExpandedAccordionAssetType(), sex); + } -LLWearableType::EType LLPanelOutfitEdit::getWearableTypeByItemUUID(const LLUUID& item_uuid) const -{ - LLViewerInventoryItem* item = gInventory.getLinkedItem(item_uuid); - return (item != NULL) ? item->getWearableType() : LLWearableType::WT_NONE; + LLWeb::loadURLExternal(url); } void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void) @@ -738,7 +667,7 @@ void LLPanelOutfitEdit::onEditWearableClicked(void) } } -void LLPanelOutfitEdit::updatePlusButton() +void LLPanelOutfitEdit::onInventorySelectionChange() { uuid_vec_t selected_items; getSelectedItemsUUID(selected_items); @@ -981,9 +910,6 @@ void LLPanelOutfitEdit::updateVerbs() mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing")); updateCurrentOutfitName(); - - //updating state of "Wear Item" button previously known as "Plus" button - updatePlusButton(); } bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel) @@ -1019,6 +945,9 @@ void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type showAddWearablesPanel(true); showWearablesListView(); + // Reset mWearableItemsList position to top. See EXT-8180. + mWearableItemsList->goToTop(); + //e_list_view_item_type implicitly contains LLWearableType::EType starting from LVIT_SHAPE applyListViewFilter((EListViewItemType) (LVIT_SHAPE + type)); } @@ -1085,13 +1014,5 @@ void LLPanelOutfitEdit::getSelectedItemsUUID(uuid_vec_t& uuid_list) // return selected_id; } -void LLPanelOutfitEdit::onCOFChanged() -{ - //the panel is only updated when is visible to a user - if (!isInVisibleChain()) return; - - update(); -} - // EOF diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 770e2a229b..fb9a35411c 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -145,10 +145,10 @@ public: void onFolderViewFilterCommitted(LLUICtrl* ctrl); void onListViewFilterCommitted(LLUICtrl* ctrl); void onSearchEdit(const std::string& string); - void updatePlusButton(); + void onInventorySelectionChange(); void onPlusBtnClicked(void); - void onVisibilityChange(const LLSD &in_visible_chain); + void onVisibilityChange(); void applyFolderViewFilter(EFolderViewItemType type); void applyListViewFilter(EListViewItemType type); @@ -196,11 +196,6 @@ private: void onOutfitChanging(bool started); void getSelectedItemsUUID(uuid_vec_t& uuid_list); void getCurrentItemUUID(LLUUID& selected_id); - void onCOFChanged(); - - LLWearableType::EType getCOFWearablesSelectionType() const; - LLWearableType::EType getAddMorePanelSelectionType() const; - LLWearableType::EType getWearableTypeByItemUUID(const LLUUID& item_uuid) const; LLTextBox* mCurrentOutfitName; LLTextBox* mStatus; diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index f2e6969998..8fe78a0f81 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -582,7 +582,7 @@ void LLParticipantList::addAvatarIDExceptAgent(const LLUUID& avatar_id) else { std::string display_name = LLVoiceClient::getInstance()->getDisplayName(avatar_id); - mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), display_name.empty() ? LLTrans::getString("AvatarNameWaiting") : display_name); + mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), display_name.empty() ? display_name : LLTrans::getString("AvatarNameWaiting")); mAvalineUpdater->watchAvalineCaller(avatar_id); } adjustParticipant(avatar_id); diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index c4cbbbb791..bf18c9e5e7 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -75,8 +75,7 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key) mLastWidth(0), mAspectRatio(0.f), mPreviewToSave(FALSE), - mImage(NULL), - mImageOldBoostLevel(LLViewerTexture::BOOST_NONE) + mImage(NULL) { updateImageID(); if (key.has("save_as")) @@ -94,7 +93,7 @@ LLPreviewTexture::~LLPreviewTexture() { getWindow()->decBusyCount(); } - mImage->setBoostLevel(mImageOldBoostLevel); + mImage = NULL; } @@ -544,7 +543,6 @@ 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; diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index cbdb057781..0f29a741c1 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -82,10 +82,9 @@ private: void updateDimensions(); LLUUID mImageID; LLPointer mImage; - S32 mImageOldBoostLevel; + BOOL mLoadingFullImage; std::string mSaveFileName; LLFrameTimer mSavedFileTimer; - BOOL mLoadingFullImage; BOOL mShowKeepDiscard; BOOL mCopyToInv; @@ -95,10 +94,11 @@ private: // 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; + F32 mAspectRatio; + BOOL mUpdateDimensions; LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; }; diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 75797dae81..b68fc3b002 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -176,15 +176,7 @@ void LLScriptFloater::onClose(bool app_quitting) if(getNotificationId().notNull()) { - // we shouldn't kill notification on exit since it may be used as persistent. - if (app_quitting) - { - LLScriptFloaterManager::getInstance()->onRemoveNotification(getNotificationId()); - } - else - { - LLScriptFloaterManager::getInstance()->removeNotification(getNotificationId()); - } + LLScriptFloaterManager::getInstance()->onRemoveNotification(getNotificationId()); } } @@ -360,7 +352,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) set_new_message |= !floater->hasFocus(); } - removeNotification(it->first); + onRemoveNotification(it->first); } } @@ -387,17 +379,6 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) toggleScriptFloater(notification_id, set_new_message); } -void LLScriptFloaterManager::removeNotification(const LLUUID& notification_id) -{ - LLNotificationPtr notification = LLNotifications::instance().find(notification_id); - if (notification != NULL && !notification->isCancelled()) - { - LLNotificationsUtil::cancel(notification); - } - - onRemoveNotification(notification_id); -} - void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) { if(notification_id.isNull()) @@ -411,8 +392,6 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) LLIMWellWindow::getInstance()->removeObjectRow(notification_id); - mNotifications.erase(notification_id); - // close floater LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", notification_id); if(floater) @@ -421,6 +400,8 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) floater->setNotificationId(LLUUID::null); floater->closeFloater(); } + + mNotifications.erase(notification_id); } void LLScriptFloaterManager::toggleScriptFloater(const LLUUID& notification_id, bool set_new_message) diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 6990234fd7..dc0cfc2400 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -64,11 +64,6 @@ public: */ void onAddNotification(const LLUUID& notification_id); - /** - * Removes notification. - */ - void removeNotification(const LLUUID& notification_id); - /** * Handles notification removal. * Removes script notification toast, removes script chiclet, closes script floater diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 7104f3934d..98282c1673 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -230,15 +230,15 @@ LLSideTrayTab* LLSideTrayTab::createInstance () LLSideTray::Params::Params() : collapsed("collapsed",false), - tab_btn_image_normal("tab_btn_image",LLUI::getUIImage("sidebar_tab_left.tga")), - tab_btn_image_selected("tab_btn_image_selected",LLUI::getUIImage("button_enabled_selected_32x128.tga")), + tab_btn_image_normal("tab_btn_image","sidebar_tab_left.tga"), + tab_btn_image_selected("tab_btn_image_selected","button_enabled_selected_32x128.tga"), default_button_width("tab_btn_width",32), default_button_height("tab_btn_height",32), default_button_margin("tab_btn_margin",0) {} //virtual -LLSideTray::LLSideTray(const Params& params) +LLSideTray::LLSideTray(Params& params) : LLPanel(params) ,mActiveTab(0) ,mCollapsed(false) @@ -373,10 +373,10 @@ LLButton* LLSideTray::createButton (const std::string& name,const std::string& i bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_TOP); bparams.rect (rect); bparams.tab_stop(false); - bparams.image_unselected(sidetray_params.tab_btn_image_normal); - bparams.image_selected(sidetray_params.tab_btn_image_selected); - bparams.image_disabled(sidetray_params.tab_btn_image_normal); - bparams.image_disabled_selected(sidetray_params.tab_btn_image_selected); + bparams.image_unselected.name(sidetray_params.tab_btn_image_normal); + bparams.image_selected.name(sidetray_params.tab_btn_image_selected); + bparams.image_disabled.name(sidetray_params.tab_btn_image_normal); + bparams.image_disabled_selected.name(sidetray_params.tab_btn_image_selected); LLButton* button = LLUICtrlFactory::create (bparams); button->setLabel(name); diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 406cdc9055..3a8d308425 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -54,13 +54,13 @@ public: : public LLInitParam::Block { // initial state - Optional collapsed; - Optional tab_btn_image_normal, - tab_btn_image_selected; + Optional collapsed; + Optional tab_btn_image_normal; + Optional tab_btn_image_selected; - Optional default_button_width, - default_button_height, - default_button_margin; + Optional default_button_width; + Optional default_button_height; + Optional default_button_margin; Params(); }; @@ -68,7 +68,7 @@ public: static LLSideTray* getInstance (); static bool instanceCreated (); protected: - LLSideTray(const Params& params); + LLSideTray(Params& params); typedef std::vector child_vector_t; typedef child_vector_t::iterator child_vector_iter_t; typedef child_vector_t::const_iterator child_vector_const_iter_t; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 1a8c2b8fc0..e6b4aeb6c2 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -371,7 +371,7 @@ LLIMWellWindow::ObjectRowPanel::~ObjectRowPanel() //--------------------------------------------------------------------------------- void LLIMWellWindow::ObjectRowPanel::onClosePanel() { - LLScriptFloaterManager::getInstance()->removeNotification(mChiclet->getSessionId()); + LLScriptFloaterManager::getInstance()->onRemoveNotification(mChiclet->getSessionId()); } void LLIMWellWindow::ObjectRowPanel::initChiclet(const LLUUID& notification_id, bool new_message/* = false*/) @@ -832,7 +832,7 @@ void LLIMWellWindow::closeAllImpl() ObjectRowPanel* obj_panel = dynamic_cast (panel); if (obj_panel) { - LLScriptFloaterManager::instance().removeNotification(*iter); + LLScriptFloaterManager::instance().onRemoveNotification(*iter); } } } diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 0b02861b75..fcb9deb20b 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -423,10 +423,6 @@ BOOL LLFloaterTexturePicker::postBuild() mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mInventoryPanel->setAllowMultiSelect(FALSE); - // Disable auto selecting first filtered item because it takes away - // selection from the item set by LLTextureCtrl owning this floater. - mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE); - // Commented out to scroll to currently selected texture. See EXT-5403. // // store this filter as the default one // mInventoryPanel->getRootFolder()->getFilter()->markDefault(); diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp index 333f682e8f..8488527185 100644 --- a/indra/newview/llurllineeditorctrl.cpp +++ b/indra/newview/llurllineeditorctrl.cpp @@ -89,10 +89,9 @@ void LLURLLineEditor::copyEscapedURLToClipboard() const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length)); LLWString text_to_copy; - // *HACK: Because LLSLURL is currently broken we cannot use it to check if unescaped_text is a valid SLURL (see EXT-8335). - if (LLStringUtil::startsWith(unescaped_text, "http://")) // SLURL + if (LLSLURL(unescaped_text).isValid()) text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text)); - else // human-readable location + else text_to_copy = utf8str_to_wstring(unescaped_text); gClipboard.copyFromString( text_to_copy ); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index cbc86c89cc..1ff4d6db9e 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -847,21 +847,6 @@ LLInventoryCallbackManager::~LLInventoryCallbackManager() sInstance = NULL; } -//static -void LLInventoryCallbackManager::destroyClass() -{ - if (sInstance) - { - for (callback_map_t::iterator it = sInstance->mMap.begin(), end_it = sInstance->mMap.end(); it != end_it; ++it) - { - // drop LLPointer reference to callback - it->second = NULL; - } - sInstance->mMap.clear(); - } -} - - U32 LLInventoryCallbackManager::registerCB(LLPointer cb) { if (cb.isNull()) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 1dd6597388..d0d3ad693e 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -36,7 +36,6 @@ #include "llinventory.h" #include "llframetimer.h" #include "llwearable.h" -#include "llui.h" //for LLDestroyClass #include // boost::signals2::trackable @@ -300,9 +299,8 @@ private: // misc functions //void inventory_reliable_callback(void**, S32 status); -class LLInventoryCallbackManager : public LLDestroyClass +class LLInventoryCallbackManager { - friend class LLDestroyClass; public: LLInventoryCallbackManager(); ~LLInventoryCallbackManager(); @@ -310,12 +308,9 @@ public: void fire(U32 callback_id, const LLUUID& item_id); U32 registerCB(LLPointer cb); private: - typedef std::map > callback_map_t; - callback_map_t mMap; + std::map > mMap; U32 mLastCallback; static LLInventoryCallbackManager *sInstance; - static void destroyClass(); - public: static bool is_instantiated() { return sInstance != NULL; } }; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 53fb01aec3..07b6431c92 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2585,7 +2585,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) params.substitutions = substitutions; params.payload = payload; - LLPostponedNotification::add(params, from_id, from_group); + LLPostponedNotification::add(params, from_id, false); } break; case IM_FROM_TASK_AS_ALERT: diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 15bdf126c5..6d93de2383 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -79,7 +79,6 @@ #include "llviewerparceloverlay.h" #include "llviewerpartsource.h" #include "llviewerregion.h" -#include "llviewerstats.h" #include "llviewertextureanim.h" #include "llviewerwindow.h" // For getSpinAxis #include "llvoavatar.h" @@ -1917,12 +1916,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, avatar->clampAttachmentPositions(); } - - // If we're snapping the position by more than 0.5m, update LLViewerStats::mAgentPositionSnaps - if ( asAvatar() && asAvatar()->isSelf() && (mag_sqr > 0.25f) ) - { - LLViewerStats::getInstance()->mAgentPositionSnaps.push( diff.length() ); - } } if (new_rot != mLastRot diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index a706e77f19..bdc34d0f18 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -280,8 +280,6 @@ LLViewerStats::LLViewerStats() : { mStats[ST_HAS_BAD_TIMER] = 1.0; } - - mAgentPositionSnaps.reset(); } LLViewerStats::~LLViewerStats() @@ -301,8 +299,6 @@ void LLViewerStats::resetStats() LLViewerStats::getInstance()->mPacketsOutStat.reset(); LLViewerStats::getInstance()->mFPSStat.reset(); LLViewerStats::getInstance()->mTexturePacketsStat.reset(); - - LLViewerStats::getInstance()->mAgentPositionSnaps.reset(); } @@ -397,10 +393,6 @@ void LLViewerStats::addToMessage(LLSD &body) const << llendl; } } - - body["AgentPositionSnaps"] = mAgentPositionSnaps.getData(); - llinfos << "STAT: AgentPositionSnaps: Mean = " << mAgentPositionSnaps.getMean() << "; StdDev = " << mAgentPositionSnaps.getStdDev() - << "; Count = " << mAgentPositionSnaps.getCount() << llendl; } // static diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 694eeaf097..13d73000d2 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -197,61 +197,6 @@ public: void addToMessage(LLSD &body) const; - struct StatsAccumulator - { - S32 mCount; - F32 mSum; - F32 mSumOfSquares; - U32 mCountOfNextUpdatesToIgnore; - - inline void push( F32 val ) - { - if ( mCountOfNextUpdatesToIgnore > 0 ) - { - mCountOfNextUpdatesToIgnore--; - return; - } - - mCount++; - mSum += val; - mSumOfSquares += val * val; - } - - inline F32 getMean() const - { - return (mCount == 0) ? 0.f : ((F32)mSum)/mCount; - } - - inline F32 getStdDev() const - { - const F32 mean = getMean(); - return (mCount == 0) ? 0.f : sqrt( mSumOfSquares/mCount - (mean * mean) ); - } - - inline U32 getCount() const - { - return mCount; - } - - inline void reset() - { - mCount = 0; - mSum = mSumOfSquares = 0.f; - mCountOfNextUpdatesToIgnore = 0; - } - - inline LLSD getData() const - { - LLSD data; - data["mean"] = getMean(); - data["std_dev"] = getStdDev(); - data["count"] = (S32)mCount; - return data; - } - }; - - StatsAccumulator mAgentPositionSnaps; - private: F64 mStats[ST_COUNT]; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 75bb9f84e2..0afbce7d51 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -495,7 +495,6 @@ LLViewerTexture::LLViewerTexture(const U32 width, const U32 height, const U8 com mFullHeight = height ; mUseMipMaps = usemipmaps ; mComponents = components ; - setTexelsPerImage(); mID.generate(); sImageCount++; @@ -523,7 +522,6 @@ void LLViewerTexture::init(bool firstinit) mFullWidth = 0; mFullHeight = 0; - mTexelsPerImage = 0 ; mUseMipMaps = FALSE ; mComponents = 0 ; @@ -532,7 +530,7 @@ void LLViewerTexture::init(bool firstinit) mMaxVirtualSize = 0.f; mNeedsGLTexture = FALSE ; mMaxVirtualSizeResetInterval = 1; - mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval ; + mMaxVirtualSizeResetCounter = 1 ; mAdditionalDecodePriority = 0.f ; mParcelMedia = NULL ; mNumFaces = 0 ; @@ -840,8 +838,7 @@ BOOL LLViewerTexture::createGLTexture(S32 discard_level, const LLImageRaw* image { mFullWidth = mGLTexturep->getCurrentWidth() ; mFullHeight = mGLTexturep->getCurrentHeight() ; - mComponents = mGLTexturep->getComponents() ; - setTexelsPerImage(); + mComponents = mGLTexturep->getComponents() ; } return ret ; @@ -1059,16 +1056,9 @@ void LLViewerTexture::destroyGLTexture() } } -void LLViewerTexture::setTexelsPerImage() -{ - S32 fullwidth = llmin(mFullWidth,(S32)MAX_IMAGE_SIZE_DEFAULT); - S32 fullheight = llmin(mFullHeight,(S32)MAX_IMAGE_SIZE_DEFAULT); - mTexelsPerImage = (F32)fullwidth * fullheight; -} - BOOL LLViewerTexture::isLargeImage() { - return (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize ; + return mFullWidth * mFullHeight > LLViewerTexture::sMinLargeImageSize ; } //virtual @@ -1425,7 +1415,6 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) mFullWidth = mRawImage->getWidth(); mFullHeight = mRawImage->getHeight(); - setTexelsPerImage(); } else { @@ -1630,7 +1619,11 @@ F32 LLViewerFetchedTexture::calcDecodePriority() { // priority range = 100,000 - 500,000 S32 desired_discard = mDesiredDiscardLevel; - if (!isJustBound() && mCachedRawImageReady) + if (getDontDiscard()) + { + desired_discard -= 2; + } + else if (!isJustBound() && mCachedRawImageReady) { if(mBoostLevel < BOOST_HIGH) { @@ -1646,7 +1639,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() S32 ddiscard = cur_discard - desired_discard; ddiscard = llclamp(ddiscard, -1, MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY); - priority = (ddiscard + 1) * PRIORITY_DELTA_DISCARD_LEVEL_FACTOR; + priority = (ddiscard + 1) * PRIORITY_DELTA_DISCARD_LEVEL_FACTOR; } // Priority Formula: @@ -1654,51 +1647,19 @@ F32 LLViewerFetchedTexture::calcDecodePriority() // [10,000,000] + [1,000,000-9,000,000] + [100,000-500,000] + [1-20,000] + [0-999] if (priority > 0.0f) { - bool large_enough = mCachedRawImageReady && ((S32)mTexelsPerImage > sMinLargeImageSize) ; - if(large_enough) - { - //Note: - //to give small, low-priority textures some chance to be fetched, - //cut the priority in half if the texture size is larger than 256 * 256 and has a 64*64 ready. - priority *= 0.5f ; - } - pixel_priority = llclamp(pixel_priority, 0.0f, MAX_PRIORITY_PIXEL); priority += pixel_priority + PRIORITY_BOOST_LEVEL_FACTOR * mBoostLevel; if ( mBoostLevel > BOOST_HIGH) { - if(mBoostLevel > BOOST_SUPER_HIGH) - { - //for very important textures, always grant the highest priority. - priority += PRIORITY_BOOST_HIGH_FACTOR; - } - else if(mCachedRawImageReady) - { - //Note: - //to give small, low-priority textures some chance to be fetched, - //if high priority texture has a 64*64 ready, lower its fetching priority. - setAdditionalDecodePriority(0.5f) ; - } - else - { - priority += PRIORITY_BOOST_HIGH_FACTOR; - } + priority += PRIORITY_BOOST_HIGH_FACTOR; } if(mAdditionalDecodePriority > 0.0f) { // priority range += 1,000,000.f-9,000,000.f - F32 additional = PRIORITY_ADDITIONAL_FACTOR * (1.0 + mAdditionalDecodePriority * MAX_ADDITIONAL_LEVEL_FOR_PRIORITY); - if(large_enough) - { - //Note: - //to give small, low-priority textures some chance to be fetched, - //cut the additional priority to a quarter if the texture size is larger than 256 * 256 and has a 64*64 ready. - additional *= 0.25f ; - } - priority += additional; + priority += PRIORITY_ADDITIONAL_FACTOR * (1.0 + mAdditionalDecodePriority * MAX_ADDITIONAL_LEVEL_FOR_PRIORITY); } } return priority; @@ -1741,6 +1702,11 @@ void LLViewerFetchedTexture::updateVirtualSize() addTextureStats(0.f, FALSE) ;//reset } + if(mForceToSaveRawImage) + { + setAdditionalDecodePriority(0.75f) ; //boost the fetching priority + } + for(U32 i = 0 ; i < mNumFaces ; i++) { LLFace* facep = mFaceList[i] ; @@ -1853,7 +1819,6 @@ bool LLViewerFetchedTexture::updateFetch() { mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; mFullHeight = mRawImage->getHeight() << mRawDiscardLevel; - setTexelsPerImage(); if(mFullWidth > MAX_IMAGE_SIZE || mFullHeight > MAX_IMAGE_SIZE) { @@ -2922,6 +2887,10 @@ void LLViewerLODTexture::processTextureStats() //static const F64 log_2 = log(2.0); static const F64 log_4 = log(4.0); + S32 fullwidth = llmin(mFullWidth,(S32)MAX_IMAGE_SIZE_DEFAULT); + S32 fullheight = llmin(mFullHeight,(S32)MAX_IMAGE_SIZE_DEFAULT); + mTexelsPerImage = (F32)fullwidth * fullheight; + F32 discard_level = 0.f; // If we know the output width and height, we can force the discard diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index b33d04e8dd..8b69408e4b 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -126,16 +126,15 @@ public: BOOST_HIGH = 10, BOOST_BUMP , BOOST_TERRAIN , // has to be high priority for minimap / low detail - BOOST_SELECTED , - BOOST_AVATAR_BAKED_SELF , - BOOST_AVATAR_SELF , // needed for baking avatar - BOOST_SUPER_HIGH , //textures higher than this need to be downloaded at the required resolution without delay. + BOOST_SELECTED , BOOST_HUD , + BOOST_AVATAR_BAKED_SELF , BOOST_ICON , BOOST_UI , BOOST_PREVIEW , BOOST_MAP , - BOOST_MAP_VISIBLE , + BOOST_MAP_VISIBLE , + BOOST_AVATAR_SELF , // needed for baking avatar BOOST_MAX_LEVEL, //other texture Categories @@ -269,7 +268,6 @@ protected: void init(bool firstinit) ; void reorganizeFaceList() ; void reorganizeVolumeList() ; - void setTexelsPerImage(); private: //note: do not make this function public. /*virtual*/ LLImageGL* getGLTexture() const ; @@ -282,7 +280,6 @@ protected: S32 mFullHeight; BOOL mUseMipMaps ; S8 mComponents; - F32 mTexelsPerImage; // Texels per image. mutable S8 mNeedsGLTexture; mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need? mutable S32 mMaxVirtualSizeResetCounter ; @@ -601,6 +598,8 @@ private: void scaleDown() ; private: + + F32 mTexelsPerImage; // Texels per image. F32 mDiscardVirtualSize; // Virtual size used to calculate desired discard F32 mCalculatedDiscardLevel; // Last calculated discard level }; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 07b98eaf82..47e35ca0c4 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3189,26 +3189,29 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { // muted avatars update at 16 hz mUpdatePeriod = 16; } - else if (mVisibilityRank <= LLVOAvatar::sMaxVisible) + else if (visible && mVisibilityRank <= LLVOAvatar::sMaxVisible) { //first 25% of max visible avatars are not impostored mUpdatePeriod = 1; } - else if (mVisibilityRank > LLVOAvatar::sMaxVisible * 4) + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 4) { //background avatars are REALLY slow updating impostors mUpdatePeriod = 16; } - else if (mVisibilityRank > LLVOAvatar::sMaxVisible * 3) + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 3) { //back 25% of max visible avatars are slow updating impostors mUpdatePeriod = 8; } - else if (mImpostorPixelArea <= impostor_area) + else if (visible && mImpostorPixelArea <= impostor_area) { // stuff in between gets an update period based on pixel area mUpdatePeriod = llclamp((S32) sqrtf(impostor_area*4.f/mImpostorPixelArea), 2, 8); } + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible) + { // force nearby impostors in ultra crowded areas + mUpdatePeriod = 2; + } else - { - //nearby avatars, update the impostors more frequently. - mUpdatePeriod = 4; + { // not impostored + mUpdatePeriod = 1; } visible = (LLDrawable::getCurrentFrame()+mID.mData[0])%mUpdatePeriod == 0 ? TRUE : FALSE; @@ -4271,12 +4274,10 @@ void LLVOAvatar::checkTextureLoading() return ; } -const F32 SELF_ADDITIONAL_PRI = 0.75f ; -const F32 ADDITIONAL_PRI = 0.5f; void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level) { //if this function is not called for the last 512 frames, the texture pipeline will stop fetching this texture. - static const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 512 ; //frames + static const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 512 ; //frames imagep->resetTextureStats(); imagep->setCanUseHTTP(false) ; //turn off http fetching for baked textures. @@ -4286,14 +4287,9 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel mMinPixelArea = llmin(pixel_area, mMinPixelArea); imagep->addTextureStats(pixel_area / texel_area_ratio); imagep->setBoostLevel(boost_level); - - if(boost_level != LLViewerTexture::BOOST_AVATAR_BAKED_SELF) - { - imagep->setAdditionalDecodePriority(ADDITIONAL_PRI) ; - } - else + if(boost_level == LLViewerTexture::BOOST_AVATAR_BAKED_SELF) { - imagep->setAdditionalDecodePriority(SELF_ADDITIONAL_PRI) ; + imagep->setAdditionalDecodePriority(1.0f) ; } } @@ -7304,7 +7300,7 @@ void LLVOAvatar::cullAvatarsByPixelArea() std::sort(LLCharacter::sInstances.begin(), LLCharacter::sInstances.end(), CompareScreenAreaGreater()); // Update the avatars that have changed status - U32 rank = 2; //1 is reserved for self. + U32 rank = 0; for (std::vector::iterator iter = LLCharacter::sInstances.begin(); iter != LLCharacter::sInstances.end(); ++iter) { @@ -7328,7 +7324,7 @@ void LLVOAvatar::cullAvatarsByPixelArea() if (inst->isSelf()) { - inst->setVisibilityRank(1); + inst->setVisibilityRank(0); } else if (inst->mDrawable.notNull() && inst->mDrawable->isVisible()) { diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 49b9fe1536..3dad919875 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -868,7 +868,7 @@ private: public: // Responsible for detecting the user's voice signal (and when the // user speaks, it puts a voice symbol over the avatar's head) and gesticulations - LLPointer mVoiceVisualizer; + LLVoiceVisualizer* mVoiceVisualizer; int mCurrentGesticulationLevel; //-------------------------------------------------------------------- @@ -1048,6 +1048,5 @@ protected: // Shared with LLVOAvatarSelf *******************************************************************************/ }; // LLVOAvatar -extern const F32 SELF_ADDITIONAL_PRI; #endif // LL_VO_AVATAR_H diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index b80e47e11a..4edbbb7402 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2034,7 +2034,7 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe imagep->resetTextureStats(); imagep->setMaxVirtualSizeResetInterval(16); imagep->addTextureStats( desired_pixels / texel_area_ratio ); - imagep->setAdditionalDecodePriority(SELF_ADDITIONAL_PRI) ; + imagep->setAdditionalDecodePriority(1.0f) ; imagep->forceUpdateBindStats() ; if (imagep->getDiscardLevel() < 0) { diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 60ebb9416e..3887f64618 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -85,8 +85,8 @@ void LLPanelWearableListItem::onMouseLeave(S32 x, S32 y, MASK mask) reshapeWidgets(); } -LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item, const LLPanelWearableListItem::Params& params) -: LLPanelInventoryListItemBase(item, params) +LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item) +: LLPanelInventoryListItemBase(item) { } @@ -101,19 +101,15 @@ LLPanelWearableOutfitItem* LLPanelWearableOutfitItem::create(LLViewerInventoryIt LLPanelWearableOutfitItem* list_item = NULL; if (item) { - const LLPanelInventoryListItemBase::Params& params = LLUICtrlFactory::getDefaultParams(); - - list_item = new LLPanelWearableOutfitItem(item, worn_indication_enabled, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelWearableOutfitItem(item, worn_indication_enabled); + list_item->init(); } return list_item; } LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item, - bool worn_indication_enabled, - const LLPanelWearableOutfitItem::Params& params) -: LLPanelInventoryListItemBase(item, params) + bool worn_indication_enabled) +: LLPanelInventoryListItemBase(item) , mWornIndicationEnabled(worn_indication_enabled) { } @@ -136,17 +132,6 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name, ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelClothingListItem(&typeid(LLPanelClothingListItem::Params), "clothing_list_item"); - - -LLPanelClothingListItem::Params::Params() -: up_btn("up_btn"), - down_btn("down_btn"), - edit_btn("edit_btn"), - lock_panel("lock_panel"), - edit_panel("edit_panel"), - lock_icon("lock_icon") -{} // static LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem* item) @@ -154,54 +139,24 @@ LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem* LLPanelClothingListItem* list_item = NULL; if(item) { - const LLPanelClothingListItem::Params& params = LLUICtrlFactory::getDefaultParams(); - list_item = new LLPanelClothingListItem(item, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelClothingListItem(item); + list_item->init(); } return list_item; } -LLPanelClothingListItem::LLPanelClothingListItem(LLViewerInventoryItem* item, const LLPanelClothingListItem::Params& params) - : LLPanelDeletableWearableListItem(item, params) -{ - LLButton::Params button_params = params.up_btn; - applyXUILayout(button_params, this); - addChild(LLUICtrlFactory::create(button_params)); - - button_params = params.down_btn; - applyXUILayout(button_params, this); - addChild(LLUICtrlFactory::create(button_params)); - - LLPanel::Params panel_params = params.lock_panel; - applyXUILayout(panel_params, this); - LLPanel* lock_panelp = LLUICtrlFactory::create(panel_params); - addChild(lock_panelp); - - panel_params = params.edit_panel; - applyXUILayout(panel_params, this); - LLPanel* edit_panelp = LLUICtrlFactory::create(panel_params); - addChild(edit_panelp); - - if (lock_panelp) +LLPanelClothingListItem::LLPanelClothingListItem(LLViewerInventoryItem* item) + : LLPanelDeletableWearableListItem(item) { - LLIconCtrl::Params icon_params = params.lock_icon; - applyXUILayout(icon_params, this); - lock_panelp->addChild(LLUICtrlFactory::create(icon_params)); } - if (edit_panelp) +LLPanelClothingListItem::~LLPanelClothingListItem() { - button_params = params.edit_btn; - applyXUILayout(button_params, this); - edit_panelp->addChild(LLUICtrlFactory::create(button_params)); - } - - setSeparatorVisible(false); } -LLPanelClothingListItem::~LLPanelClothingListItem() +void LLPanelClothingListItem::init() { + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_clothing_list_item.xml"); } BOOL LLPanelClothingListItem::postBuild() @@ -223,62 +178,30 @@ BOOL LLPanelClothingListItem::postBuild() ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelBodyPartsListItem(&typeid(LLPanelBodyPartsListItem::Params), "bodyparts_list_item"); - - -LLPanelBodyPartsListItem::Params::Params() -: edit_btn("edit_btn"), - edit_panel("edit_panel"), - lock_panel("lock_panel"), - lock_icon("lock_icon") -{} - // static LLPanelBodyPartsListItem* LLPanelBodyPartsListItem::create(LLViewerInventoryItem* item) { LLPanelBodyPartsListItem* list_item = NULL; if(item) { - const Params& params = LLUICtrlFactory::getDefaultParams(); - list_item = new LLPanelBodyPartsListItem(item, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelBodyPartsListItem(item); + list_item->init(); } return list_item; } -LLPanelBodyPartsListItem::LLPanelBodyPartsListItem(LLViewerInventoryItem* item, const LLPanelBodyPartsListItem::Params& params) -: LLPanelWearableListItem(item, params) +LLPanelBodyPartsListItem::LLPanelBodyPartsListItem(LLViewerInventoryItem* item) +: LLPanelWearableListItem(item) { - LLPanel::Params panel_params = params.edit_panel; - applyXUILayout(panel_params, this); - LLPanel* edit_panelp = LLUICtrlFactory::create(panel_params); - addChild(edit_panelp); - - panel_params = params.lock_panel; - applyXUILayout(panel_params, this); - LLPanel* lock_panelp = LLUICtrlFactory::create(panel_params); - addChild(lock_panelp); - - if (edit_panelp) - { - LLButton::Params btn_params = params.edit_btn; - applyXUILayout(btn_params, this); - edit_panelp->addChild(LLUICtrlFactory::create(btn_params)); } - if (lock_panelp) +LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem() { - LLIconCtrl::Params icon_params = params.lock_icon; - applyXUILayout(icon_params, this); - lock_panelp->addChild(LLUICtrlFactory::create(icon_params)); - } - - setSeparatorVisible(true); } -LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem() +void LLPanelBodyPartsListItem::init() { + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_body_parts_list_item.xml"); } BOOL LLPanelBodyPartsListItem::postBuild() @@ -291,11 +214,6 @@ BOOL LLPanelBodyPartsListItem::postBuild() return TRUE; } -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDeletableWearableListItem(&typeid(LLPanelDeletableWearableListItem::Params), "deletable_wearable_list_item"); - -LLPanelDeletableWearableListItem::Params::Params() -: delete_btn("delete_btn") -{} // static LLPanelDeletableWearableListItem* LLPanelDeletableWearableListItem::create(LLViewerInventoryItem* item) @@ -303,22 +221,20 @@ LLPanelDeletableWearableListItem* LLPanelDeletableWearableListItem::create(LLVie LLPanelDeletableWearableListItem* list_item = NULL; if(item) { - const Params& params = LLUICtrlFactory::getDefaultParams(); - list_item = new LLPanelDeletableWearableListItem(item, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelDeletableWearableListItem(item); + list_item->init(); } return list_item; } -LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInventoryItem* item, const LLPanelDeletableWearableListItem::Params& params) -: LLPanelWearableListItem(item, params) +LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInventoryItem* item) +: LLPanelWearableListItem(item) { - LLButton::Params button_params = params.delete_btn; - applyXUILayout(button_params, this); - addChild(LLUICtrlFactory::create(button_params)); +} - setSeparatorVisible(true); +void LLPanelDeletableWearableListItem::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_deletable_wearable_list_item.xml"); } BOOL LLPanelDeletableWearableListItem::postBuild() @@ -344,11 +260,8 @@ LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryIt LLPanelAttachmentListItem* list_item = NULL; if(item) { - const Params& params = LLUICtrlFactory::getDefaultParams(); - - list_item = new LLPanelAttachmentListItem(item, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelAttachmentListItem(item); + list_item->init(); } return list_item; } @@ -371,32 +284,27 @@ void LLPanelAttachmentListItem::updateItem(const std::string& name, ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDummyClothingListItem(&typeid(LLPanelDummyClothingListItem::Params), "dummy_clothing_list_item"); - -LLPanelDummyClothingListItem::Params::Params() -: add_panel("add_panel"), - add_btn("add_btn") -{} LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableType::EType w_type) { - const Params& params = LLUICtrlFactory::getDefaultParams(); - - LLPanelDummyClothingListItem* list_item = new LLPanelDummyClothingListItem(w_type, params); - list_item->initFromParams(params); - list_item->postBuild(); + LLPanelDummyClothingListItem* list_item = new LLPanelDummyClothingListItem(w_type); + list_item->init(); return list_item; } BOOL LLPanelDummyClothingListItem::postBuild() { + LLIconCtrl* icon = getChild("item_icon"); + setIconCtrl(icon); + setTitleCtrl(getChild("item_name")); + addWidgetToRightSide("btn_add_panel"); setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE)); updateItem(wearableTypeToString(mWearableType)); // Make it look loke clothing item - reserve space for 'delete' button - setLeftWidgetsWidth(getChildView("item_icon")->getRect().mLeft); + setLeftWidgetsWidth(icon->getRect().mLeft); setWidgetsVisible(false); reshapeWidgets(); @@ -409,23 +317,15 @@ LLWearableType::EType LLPanelDummyClothingListItem::getWearableType() const return mWearableType; } -LLPanelDummyClothingListItem::LLPanelDummyClothingListItem(LLWearableType::EType w_type, const LLPanelDummyClothingListItem::Params& params) -: LLPanelWearableListItem(NULL, params), - mWearableType(w_type) -{ - LLPanel::Params panel_params(params.add_panel); - applyXUILayout(panel_params, this); - LLPanel* add_panelp = LLUICtrlFactory::create(panel_params); - addChild(add_panelp); - - if (add_panelp) +LLPanelDummyClothingListItem::LLPanelDummyClothingListItem(LLWearableType::EType w_type) + : LLPanelWearableListItem(NULL) + , mWearableType(w_type) { - LLButton::Params button_params(params.add_btn); - applyXUILayout(button_params, this); - add_panelp->addChild(LLUICtrlFactory::create(button_params)); } - setSeparatorVisible(true); +void LLPanelDummyClothingListItem::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_dummy_clothing_list_item.xml"); } typedef std::map clothing_to_string_map_t; diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 367b648b3d..d16a2a89c8 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -68,7 +68,7 @@ public: protected: - LLPanelWearableListItem(LLViewerInventoryItem* item, const Params& params); + LLPanelWearableListItem(LLViewerInventoryItem* item); }; /** @@ -93,7 +93,7 @@ public: protected: LLPanelWearableOutfitItem(LLViewerInventoryItem* item, - bool worn_indication_enabled, const Params& params); + bool worn_indication_enabled); private: bool mWornIndicationEnabled; @@ -103,13 +103,6 @@ class LLPanelDeletableWearableListItem : public LLPanelWearableListItem { LOG_CLASS(LLPanelDeletableWearableListItem); public: - struct Params : public LLInitParam::Block - { - Optional delete_btn; - - Params(); - }; - static LLPanelDeletableWearableListItem* create(LLViewerInventoryItem* item); @@ -123,7 +116,9 @@ public: inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } protected: - LLPanelDeletableWearableListItem(LLViewerInventoryItem* item, const Params& params); + LLPanelDeletableWearableListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); }; /** Outfit list item for an attachment */ @@ -139,7 +134,7 @@ public: EItemState item_state = IS_DEFAULT); protected: - LLPanelAttachmentListItem(LLViewerInventoryItem* item, const Params& params) : LLPanelDeletableWearableListItem(item, params) {}; + LLPanelAttachmentListItem(LLViewerInventoryItem* item) : LLPanelDeletableWearableListItem(item) {}; }; /** @@ -152,18 +147,6 @@ class LLPanelClothingListItem : public LLPanelDeletableWearableListItem LOG_CLASS(LLPanelClothingListItem); public: - struct Params : public LLInitParam::Block - { - Optional up_btn, - down_btn, - edit_btn; - Optional lock_panel, - edit_panel; - Optional lock_icon; - - Params(); - }; - static LLPanelClothingListItem* create(LLViewerInventoryItem* item); virtual ~LLPanelClothingListItem(); @@ -179,25 +162,18 @@ public: inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } -protected: - LLPanelClothingListItem(LLViewerInventoryItem* item, const Params& params); +protected: + LLPanelClothingListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); }; class LLPanelBodyPartsListItem : public LLPanelWearableListItem { LOG_CLASS(LLPanelBodyPartsListItem); public: - struct Params : public LLInitParam::Block - { - Optional edit_btn; - Optional lock_panel, - edit_panel; - Optional lock_icon; - - Params(); - }; static LLPanelBodyPartsListItem* create(LLViewerInventoryItem* item); @@ -212,7 +188,9 @@ public: inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } protected: - LLPanelBodyPartsListItem(LLViewerInventoryItem* item, const Params& params); + LLPanelBodyPartsListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); }; @@ -224,19 +202,15 @@ protected: class LLPanelDummyClothingListItem : public LLPanelWearableListItem { public: - struct Params : public LLInitParam::Block - { - Optional add_panel; - Optional add_btn; - Params(); - }; static LLPanelDummyClothingListItem* create(LLWearableType::EType w_type); /*virtual*/ BOOL postBuild(); LLWearableType::EType getWearableType() const; protected: - LLPanelDummyClothingListItem(LLWearableType::EType w_type, const Params& params); + LLPanelDummyClothingListItem(LLWearableType::EType w_type); + + /*virtual*/ void init(); static std::string wearableTypeToString(LLWearableType::EType w_type); diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp index 660245b02b..502fefd4ef 100644 --- a/indra/newview/llwindebug.cpp +++ b/indra/newview/llwindebug.cpp @@ -97,9 +97,6 @@ void LLWinDebug::init() // Load the dbghelp dll now, instead of waiting for the crash. // Less potential for stack mangling - // Don't install vectored exception handler if being debugged. - if(IsDebuggerPresent()) return; - if (s_first_run) { // First, try loading from the directory that the app resides in. @@ -138,42 +135,36 @@ void LLWinDebug::init() void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename) { - // Temporary fix to switch out the code that writes the DMP file. - // Fix coming that doesn't write a mini dump file for regular C++ exceptions. - const bool enable_write_dump_file = false; - if ( enable_write_dump_file ) + if(f_mdwp == NULL || gDirUtilp == NULL) { - if(f_mdwp == NULL || gDirUtilp == NULL) - { - return; - } - else - { - std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename); - - HANDLE hFile = CreateFileA(dump_path.c_str(), - GENERIC_WRITE, - FILE_SHARE_WRITE, - NULL, - CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, - NULL); + return; + } + else + { + std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename); - if (hFile != INVALID_HANDLE_VALUE) - { - // Write the dump, ignoring the return value - f_mdwp(GetCurrentProcess(), - GetCurrentProcessId(), - hFile, - type, - ExInfop, - NULL, - NULL); - - CloseHandle(hFile); - } + HANDLE hFile = CreateFileA(dump_path.c_str(), + GENERIC_WRITE, + FILE_SHARE_WRITE, + NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, + NULL); + if (hFile != INVALID_HANDLE_VALUE) + { + // Write the dump, ignoring the return value + f_mdwp(GetCurrentProcess(), + GetCurrentProcessId(), + hFile, + type, + ExInfop, + NULL, + NULL); + + CloseHandle(hFile); } + } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b578cb9f69..7d0f763bd1 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7111,7 +7111,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate) { BOOL skip_avatar_update = FALSE; - if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) + if (gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) { skip_avatar_update = TRUE; } diff --git a/indra/newview/skins/default/xui/da/floater_publish_classified.xml b/indra/newview/skins/default/xui/da/floater_publish_classified.xml index 0f65e6c18a..220042f015 100644 --- a/indra/newview/skins/default/xui/da/floater_publish_classified.xml +++ b/indra/newview/skins/default/xui/da/floater_publish_classified.xml @@ -5,7 +5,7 @@ Husk, annonceomkostninger kan ikke refunderes. - + Mere info (link til hjælp om annoncer) diff --git a/indra/newview/skins/default/xui/da/menu_cof_clothing.xml b/indra/newview/skins/default/xui/da/menu_cof_clothing.xml index 16c225b7d9..73d97cd167 100644 --- a/indra/newview/skins/default/xui/da/menu_cof_clothing.xml +++ b/indra/newview/skins/default/xui/da/menu_cof_clothing.xml @@ -1,6 +1,7 @@ + + - diff --git a/indra/newview/skins/default/xui/da/menu_inventory.xml b/indra/newview/skins/default/xui/da/menu_inventory.xml index 96da784fe4..2eafeb3fcc 100644 --- a/indra/newview/skins/default/xui/da/menu_inventory.xml +++ b/indra/newview/skins/default/xui/da/menu_inventory.xml @@ -73,10 +73,11 @@ - + + diff --git a/indra/newview/skins/default/xui/da/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/da/menu_inventory_gear_default.xml index 75ce7b22f6..e643498822 100644 --- a/indra/newview/skins/default/xui/da/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/da/menu_inventory_gear_default.xml @@ -6,10 +6,9 @@ + - - diff --git a/indra/newview/skins/default/xui/da/menu_outfit_gear.xml b/indra/newview/skins/default/xui/da/menu_outfit_gear.xml index 8b4c776496..3ed0df9041 100644 --- a/indra/newview/skins/default/xui/da/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/da/menu_outfit_gear.xml @@ -1,7 +1,6 @@ - diff --git a/indra/newview/skins/default/xui/da/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/da/menu_wearable_list_item.xml index 00055c8932..6a84c518ee 100644 --- a/indra/newview/skins/default/xui/da/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/da/menu_wearable_list_item.xml @@ -1,7 +1,6 @@ - - + diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index 163df5b8d2..5ae329033d 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -230,10 +230,6 @@ Er du sikker på at du vil fortsætte? Slet favorit <nolink>[PICK]</nolink>? - - Slet valgte sæt? - - Cache vil blive tømt ved næste genstart af [APP_NAME]. @@ -939,6 +935,11 @@ Henvis til dette fra en hjemmeside for at give andre nem adgang til denne lokati Uploader billeder fra verdenen og www... (Tager omkring 5 minutter.) + + Omkostninger ved at sende: L$[AMOUNT]. +Ønsker du at fortsætte? + + Du betalte L$[AMOUNT] for at uploade. @@ -1350,6 +1351,9 @@ Fra genstand: [OBJECTNAME], ejer: [NAME]? Det lykkedes ikke at finde [TYPE] med navnet [DESC] i databasen. + + Fejl ved afsendelse af billede til web. + Den genstand du prøver at tage på benytter en funktion din klient ikke kan forstå. Upgradér venligst din version af [APP_NAME] for at kunne tage denne genstand på. diff --git a/indra/newview/skins/default/xui/da/panel_outfit_edit.xml b/indra/newview/skins/default/xui/da/panel_outfit_edit.xml index 99ef3b5411..3890f07324 100644 --- a/indra/newview/skins/default/xui/da/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/da/panel_outfit_edit.xml @@ -34,16 +34,8 @@ - - + + + @@ -866,13 +873,8 @@ function="File.UploadBulk" parameter="" /> - - - + - Delete the selected outfit? + Delete the selected outfit/s? Load web page [URL]? @@ -5592,6 +5593,7 @@ Grant this request? [FIRST] [LAST]'s '[TITLE]' [MESSAGE] @@ -5606,6 +5608,7 @@ Grant this request? [GROUPNAME]'s '[TITLE]' [MESSAGE] diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index 584ca8b3b5..d8675b3512 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -104,7 +104,6 @@ follows="top|left" font="SansSerif" left="10" - name="nearby_media_title" width="100"> Nearby Media @@ -115,7 +114,6 @@ font="SansSerif" top_pad="15" left="10" - name="show_text" width="40"> Show: diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml index d18f0d57ca..b43aa0a824 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml @@ -14,9 +14,9 @@ background_visible="true" bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" - no_matched_tabs_text.value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]." + no_matched_tabs_text.value="NoOutfitsTabsMatched" no_matched_tabs_text.v_pad="10" - no_visible_tabs_text.value="You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]" + no_visible_tabs_text.value="NoOutfits" follows="all" height="400" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index b91acbe27d..0c31fda68b 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1956,9 +1956,6 @@ Clears (deletes) the media and all params from the given face. Animations Gestures Favorites - - Favorites Current Outfit My Outfits Accessories @@ -2197,6 +2194,10 @@ Clears (deletes) the media and all params from the given face. The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing. + + You don't have any outfits yet. Try [secondlife:///app/search/all/ Search] + Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]. + (By name) (Resident) diff --git a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml b/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml deleted file mode 100644 index c08267de82..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml deleted file mode 100644 index f7a05e9bc4..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml deleted file mode 100644 index 88a4682e13..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - diff --git a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml deleted file mode 100644 index 80a877a6c2..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - diff --git a/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml b/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml index 0a5930c820..50be0ac1a1 100644 --- a/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml @@ -1,13 +1,11 @@ + height="0" + layout="topleft" + left="0" + name="inventory_list_item" + top="0" + width="0"> - - diff --git a/indra/newview/skins/default/xui/es/floater_publish_classified.xml b/indra/newview/skins/default/xui/es/floater_publish_classified.xml index a1645f0c64..5eed89d522 100644 --- a/indra/newview/skins/default/xui/es/floater_publish_classified.xml +++ b/indra/newview/skins/default/xui/es/floater_publish_classified.xml @@ -5,7 +5,7 @@ Recuerda, no se reembolsarán las cantidades abonadas por clasificados. - + Más información (enlace a ayuda de clasificados) diff --git a/indra/newview/skins/default/xui/es/menu_cof_clothing.xml b/indra/newview/skins/default/xui/es/menu_cof_clothing.xml index 3c0c588284..4051f64e14 100644 --- a/indra/newview/skins/default/xui/es/menu_cof_clothing.xml +++ b/indra/newview/skins/default/xui/es/menu_cof_clothing.xml @@ -1,6 +1,7 @@ + + - diff --git a/indra/newview/skins/default/xui/es/menu_inventory.xml b/indra/newview/skins/default/xui/es/menu_inventory.xml index 2937b0c4e3..8f606aef82 100644 --- a/indra/newview/skins/default/xui/es/menu_inventory.xml +++ b/indra/newview/skins/default/xui/es/menu_inventory.xml @@ -76,10 +76,11 @@ - + + diff --git a/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml index 8c4488a285..80cf78c0b5 100644 --- a/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml @@ -6,10 +6,9 @@ + - - diff --git a/indra/newview/skins/default/xui/es/menu_outfit_gear.xml b/indra/newview/skins/default/xui/es/menu_outfit_gear.xml index 3b11bceecf..39afa5e60b 100644 --- a/indra/newview/skins/default/xui/es/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/es/menu_outfit_gear.xml @@ -1,7 +1,6 @@ - diff --git a/indra/newview/skins/default/xui/es/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/es/menu_wearable_list_item.xml index 5b3d7d8cb3..96fc3a1e68 100644 --- a/indra/newview/skins/default/xui/es/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/es/menu_wearable_list_item.xml @@ -1,7 +1,6 @@ - - + diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml index 88013df8f5..06422a252d 100644 --- a/indra/newview/skins/default/xui/es/notifications.xml +++ b/indra/newview/skins/default/xui/es/notifications.xml @@ -355,10 +355,6 @@ No se reembolsan las cuotas pagadas. ¿Borrar el destacado <nolink>[PICK]</nolink>? - - ¿Eliminar el vestuario seleccionado? - - ¿Ir a la web de eventos de [SECOND_LIFE]? @@ -2046,6 +2042,11 @@ Publícala en una página web para que otros puedan acceder fácilmente a esta p Subiendo fotos del mundo y del sitio web... (tardará unos 5 minutos). + + La subida cuesta [AMOUNT] L$. +¿Quieres continuar? + + Has pagado [AMOUNT] LS por la subida. @@ -2465,6 +2466,9 @@ Del objeto: [OBJECTNAME]; propiedad de: [NAME]? Búsqueda fallida de [TYPE] de nombre [DESC] en la base de datos. + + Fallo al subir la imagen a la web. + El ítem que quieres vestirte tiene una característica que tu visor no puede leer. Por favor, actualiza tu versión de [APP_NAME] para ponerte este ítem. diff --git a/indra/newview/skins/default/xui/es/panel_outfit_edit.xml b/indra/newview/skins/default/xui/es/panel_outfit_edit.xml index f697539502..ca8b77b49f 100644 --- a/indra/newview/skins/default/xui/es/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/es/panel_outfit_edit.xml @@ -34,16 +34,8 @@ - - diff --git a/indra/newview/skins/default/xui/fr/menu_inventory.xml b/indra/newview/skins/default/xui/fr/menu_inventory.xml index 0e12ff68c6..8b0d726e51 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory.xml @@ -76,10 +76,11 @@ - + + diff --git a/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml index 73770dce5f..4cfdfd2614 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml @@ -6,10 +6,9 @@ + - - diff --git a/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml b/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml index 5db7f176b5..93730c6206 100644 --- a/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml @@ -1,7 +1,6 @@ - diff --git a/indra/newview/skins/default/xui/fr/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/fr/menu_wearable_list_item.xml index c477471a64..39e8ca2173 100644 --- a/indra/newview/skins/default/xui/fr/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/fr/menu_wearable_list_item.xml @@ -1,7 +1,6 @@ - - + diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index 59c978bb6b..b245c132bd 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -357,10 +357,6 @@ Voulez-vous vraiment continuer ? Supprimer la sélection <nolink>[PICK]</nolink> ? - - Supprimer la ou les tenues sélectionnées ? - - Aller à la page web de [SECOND_LIFE] réservée aux événements ? @@ -1350,7 +1346,7 @@ Télécharger vers le dossier Applications ? Consultez le Wiki sur l'Assurance Qualité de [SECOND_LIFE]. - + Pour signaler des bugs et autres problèmes, utilisez le JIRA de [SECOND_LIFE]. @@ -2036,6 +2032,11 @@ Liez-la à partir d'une page web pour permettre aux autres résidents d&apo Importation de photos SL et Web en cours... (prend environ 5 minutes.) + + Le chargement coûte [AMOUNT] L$. +Continuer ? + + Le chargement a coûté [AMOUNT] L$. @@ -2459,6 +2460,9 @@ Venant de l'objet : [OBJECTNAME], appartenant à : [NAME]? La recherche du [TYPE] nommé(e) [DESC] dans la base de données a échoué. + + Échec de chargement de l'image sur le Web. + L'objet que vous essayez de porter utilise une fonctionnalité que le client ne peut lire. Pour porter cet objet, veuillez télécharger une mise à jour de [APP_NAME]. @@ -2641,7 +2645,7 @@ Elles vont être bloquées pendant quelques secondes pour votre sécurité. Êtes-vous certain de vouloir fermer tous les IM ? - + L'élément joint a été sauvegardé. diff --git a/indra/newview/skins/default/xui/fr/panel_group_general.xml b/indra/newview/skins/default/xui/fr/panel_group_general.xml index a2655dcd45..ec6d995274 100644 --- a/indra/newview/skins/default/xui/fr/panel_group_general.xml +++ b/indra/newview/skins/default/xui/fr/panel_group_general.xml @@ -48,7 +48,7 @@ Faites glisser le pointeur de la souris sur les options pour en savoir plus. - - Catégorie de contenu - + - Sélectionner une catégorie de contenu - diff --git a/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml b/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml index a3d23b0e70..b17803eaad 100644 --- a/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml @@ -34,16 +34,8 @@ - - - - - @@ -873,8 +866,13 @@ function="File.UploadBulk" parameter="" /> - + + + - Delete the selected outfit/s? + Delete the selected outfit? Load web page [URL]? @@ -5593,7 +5592,6 @@ Grant this request? [FIRST] [LAST]'s '[TITLE]' [MESSAGE] @@ -5608,7 +5606,6 @@ Grant this request? [GROUPNAME]'s '[TITLE]' [MESSAGE] diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index d8675b3512..584ca8b3b5 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -104,6 +104,7 @@ follows="top|left" font="SansSerif" left="10" + name="nearby_media_title" width="100"> Nearby Media @@ -114,6 +115,7 @@ font="SansSerif" top_pad="15" left="10" + name="show_text" width="40"> Show: diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml index b43aa0a824..d18f0d57ca 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml @@ -14,9 +14,9 @@ background_visible="true" bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" - no_matched_tabs_text.value="NoOutfitsTabsMatched" + no_matched_tabs_text.value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]." no_matched_tabs_text.v_pad="10" - no_visible_tabs_text.value="NoOutfits" + no_visible_tabs_text.value="You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]" follows="all" height="400" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 0c31fda68b..b91acbe27d 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1956,6 +1956,9 @@ Clears (deletes) the media and all params from the given face. Animations Gestures Favorites + + Favorites Current Outfit My Outfits Accessories @@ -2194,10 +2197,6 @@ Clears (deletes) the media and all params from the given face. The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing. - - You don't have any outfits yet. Try [secondlife:///app/search/all/ Search] - Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]. - (By name) (Resident) diff --git a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml b/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml new file mode 100644 index 0000000000..c08267de82 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml @@ -0,0 +1,73 @@ + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml new file mode 100644 index 0000000000..f7a05e9bc4 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml new file mode 100644 index 0000000000..88a4682e13 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml @@ -0,0 +1,43 @@ + + + + + + diff --git a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml new file mode 100644 index 0000000000..80a877a6c2 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml @@ -0,0 +1,52 @@ + + + + + + + diff --git a/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml b/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml index 50be0ac1a1..0a5930c820 100644 --- a/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml @@ -1,11 +1,13 @@ + follows="top|right|left" + height="20" + name="inventory_item" + tab_stop="false" + hover_image="ListItem_Over" + selected_image="ListItem_Select" + separator_image="Wearables_Divider" + width="380"> + + diff --git a/indra/newview/skins/default/xui/es/floater_publish_classified.xml b/indra/newview/skins/default/xui/es/floater_publish_classified.xml index 5eed89d522..a1645f0c64 100644 --- a/indra/newview/skins/default/xui/es/floater_publish_classified.xml +++ b/indra/newview/skins/default/xui/es/floater_publish_classified.xml @@ -5,7 +5,7 @@ Recuerda, no se reembolsarán las cantidades abonadas por clasificados. - + Más información (enlace a ayuda de clasificados) diff --git a/indra/newview/skins/default/xui/es/menu_cof_clothing.xml b/indra/newview/skins/default/xui/es/menu_cof_clothing.xml index 4051f64e14..3c0c588284 100644 --- a/indra/newview/skins/default/xui/es/menu_cof_clothing.xml +++ b/indra/newview/skins/default/xui/es/menu_cof_clothing.xml @@ -1,7 +1,6 @@ - - + diff --git a/indra/newview/skins/default/xui/es/menu_inventory.xml b/indra/newview/skins/default/xui/es/menu_inventory.xml index 8f606aef82..2937b0c4e3 100644 --- a/indra/newview/skins/default/xui/es/menu_inventory.xml +++ b/indra/newview/skins/default/xui/es/menu_inventory.xml @@ -76,11 +76,10 @@ - + - diff --git a/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml index 80cf78c0b5..8c4488a285 100644 --- a/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml @@ -6,9 +6,10 @@ - + + diff --git a/indra/newview/skins/default/xui/es/menu_outfit_gear.xml b/indra/newview/skins/default/xui/es/menu_outfit_gear.xml index 39afa5e60b..3b11bceecf 100644 --- a/indra/newview/skins/default/xui/es/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/es/menu_outfit_gear.xml @@ -1,6 +1,7 @@ + diff --git a/indra/newview/skins/default/xui/es/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/es/menu_wearable_list_item.xml index 96fc3a1e68..5b3d7d8cb3 100644 --- a/indra/newview/skins/default/xui/es/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/es/menu_wearable_list_item.xml @@ -1,6 +1,7 @@ - + + diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml index 06422a252d..88013df8f5 100644 --- a/indra/newview/skins/default/xui/es/notifications.xml +++ b/indra/newview/skins/default/xui/es/notifications.xml @@ -355,6 +355,10 @@ No se reembolsan las cuotas pagadas. ¿Borrar el destacado <nolink>[PICK]</nolink>? + + ¿Eliminar el vestuario seleccionado? + + ¿Ir a la web de eventos de [SECOND_LIFE]? @@ -2042,11 +2046,6 @@ Publícala en una página web para que otros puedan acceder fácilmente a esta p Subiendo fotos del mundo y del sitio web... (tardará unos 5 minutos). - - La subida cuesta [AMOUNT] L$. -¿Quieres continuar? - - Has pagado [AMOUNT] LS por la subida. @@ -2466,9 +2465,6 @@ Del objeto: [OBJECTNAME]; propiedad de: [NAME]? Búsqueda fallida de [TYPE] de nombre [DESC] en la base de datos. - - Fallo al subir la imagen a la web. - El ítem que quieres vestirte tiene una característica que tu visor no puede leer. Por favor, actualiza tu versión de [APP_NAME] para ponerte este ítem. diff --git a/indra/newview/skins/default/xui/es/panel_outfit_edit.xml b/indra/newview/skins/default/xui/es/panel_outfit_edit.xml index ca8b77b49f..f697539502 100644 --- a/indra/newview/skins/default/xui/es/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/es/panel_outfit_edit.xml @@ -34,8 +34,16 @@ - + + diff --git a/indra/newview/skins/default/xui/fr/menu_inventory.xml b/indra/newview/skins/default/xui/fr/menu_inventory.xml index 8b0d726e51..0e12ff68c6 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory.xml @@ -76,11 +76,10 @@ - + - diff --git a/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml index 4cfdfd2614..73770dce5f 100644 --- a/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml @@ -6,9 +6,10 @@ - + + diff --git a/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml b/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml index 93730c6206..5db7f176b5 100644 --- a/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/fr/menu_outfit_gear.xml @@ -1,6 +1,7 @@ + diff --git a/indra/newview/skins/default/xui/fr/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/fr/menu_wearable_list_item.xml index 39e8ca2173..c477471a64 100644 --- a/indra/newview/skins/default/xui/fr/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/fr/menu_wearable_list_item.xml @@ -1,6 +1,7 @@ - + + diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index b245c132bd..59c978bb6b 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -357,6 +357,10 @@ Voulez-vous vraiment continuer ? Supprimer la sélection <nolink>[PICK]</nolink> ? + + Supprimer la ou les tenues sélectionnées ? + + Aller à la page web de [SECOND_LIFE] réservée aux événements ? @@ -1346,7 +1350,7 @@ Télécharger vers le dossier Applications ? Consultez le Wiki sur l'Assurance Qualité de [SECOND_LIFE]. - + Pour signaler des bugs et autres problèmes, utilisez le JIRA de [SECOND_LIFE]. @@ -2032,11 +2036,6 @@ Liez-la à partir d'une page web pour permettre aux autres résidents d&apo Importation de photos SL et Web en cours... (prend environ 5 minutes.) - - Le chargement coûte [AMOUNT] L$. -Continuer ? - - Le chargement a coûté [AMOUNT] L$. @@ -2460,9 +2459,6 @@ Venant de l'objet : [OBJECTNAME], appartenant à : [NAME]? La recherche du [TYPE] nommé(e) [DESC] dans la base de données a échoué. - - Échec de chargement de l'image sur le Web. - L'objet que vous essayez de porter utilise une fonctionnalité que le client ne peut lire. Pour porter cet objet, veuillez télécharger une mise à jour de [APP_NAME]. @@ -2645,7 +2641,7 @@ Elles vont être bloquées pendant quelques secondes pour votre sécurité. Êtes-vous certain de vouloir fermer tous les IM ? - + L'élément joint a été sauvegardé. diff --git a/indra/newview/skins/default/xui/fr/panel_group_general.xml b/indra/newview/skins/default/xui/fr/panel_group_general.xml index ec6d995274..a2655dcd45 100644 --- a/indra/newview/skins/default/xui/fr/panel_group_general.xml +++ b/indra/newview/skins/default/xui/fr/panel_group_general.xml @@ -48,7 +48,7 @@ Faites glisser le pointeur de la souris sur les options pour en savoir plus. - - Sélectionner une catégorie de contenu - + - Catégorie de contenu - diff --git a/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml b/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml index b17803eaad..a3d23b0e70 100644 --- a/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/fr/panel_outfit_edit.xml @@ -34,8 +34,16 @@ - + + - @@ -1699,7 +1662,6 @@ function="ToggleControl" parameter="QAMode" /> - - - @@ -1814,9 +1774,7 @@ function="Advanced.DumpInfoToConsole" parameter="capabilities" /> - - @@ -1904,9 +1862,7 @@ function="ToggleControl" parameter="DebugShowColor" /> - - - - - - - + label="Deferred Rendering" + name="Deferred Rendering"> @@ -2230,31 +2181,7 @@ function="Advanced.EnableRenderDeferred" /> - - - - - - - - - - + function="Advanced.EnableRenderDeferredGI" /> - - @@ -2289,24 +2214,14 @@ parameter="RenderDebugPipeline" /> - - - - + label="Fast Alpha" + name="Fast Alpha"> + parameter="RenderFastAlpha" /> + parameter="RenderFastAlpha" /> - - @@ -2420,9 +2333,7 @@ - - @@ -2443,9 +2354,7 @@ function="ToggleControl" parameter="PingInterpolate" /> - - - @@ -2979,9 +2887,7 @@ function="Advanced.DumpAvatarLocalTextures" /> - - @@ -3018,9 +2924,7 @@ function="ToggleControl" parameter="ShowConsoleWindow" /> - - @@ -3355,9 +3259,7 @@ name="PublicIssueTrackerHelp_url" parameter="WebLaunchPublicIssueHelp,http://wiki.secondlife.com/wiki/Issue_tracker" /> - - diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml index 5feac53c33..8af2e1eaca 100644 --- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml @@ -13,7 +13,7 @@ layout="topleft" name="wear_wear"> + function="Wearable.Add" /> - - - - - - - - - [QUESTION] - - - - diff --git a/indra/newview/skins/default/xui/en/panel_bars.xml b/indra/newview/skins/default/xui/en/panel_bars.xml new file mode 100644 index 0000000000..96722ce278 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_bars.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml index 216a265164..4f989a6f6f 100644 --- a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml @@ -41,7 +41,7 @@ height="16" layout="topleft" left_pad="5" - parse_urls="false" + allow_html="false" use_ellipses="true" name="item_name" text_color="white" diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index 17e8d4d2df..9124ad528d 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -21,7 +21,7 @@ top="3" width="18" /> - + diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml index 268cb4e5f9..e66cf400b4 100644 --- a/indra/newview/skins/default/xui/en/panel_classified_info.xml +++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml @@ -202,7 +202,7 @@ value="Category:" width="140" /> - + diff --git a/indra/newview/skins/default/xui/pl/floater_bulk_perms.xml b/indra/newview/skins/default/xui/pl/floater_bulk_perms.xml index 0f49061002..ed2e037d3c 100644 --- a/indra/newview/skins/default/xui/pl/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/pl/floater_bulk_perms.xml @@ -18,8 +18,8 @@ - - + + diff --git a/indra/newview/skins/default/xui/pl/floater_pay.xml b/indra/newview/skins/default/xui/pl/floater_pay.xml index c9243fda65..dccb7ed2bb 100644 --- a/indra/newview/skins/default/xui/pl/floater_pay.xml +++ b/indra/newview/skins/default/xui/pl/floater_pay.xml @@ -1,7 +1,7 @@ - Zapłać grupie + Zapłać Grupie Zapłać Rezydentowi diff --git a/indra/newview/skins/default/xui/pl/floater_pay_object.xml b/indra/newview/skins/default/xui/pl/floater_pay_object.xml index 19032b3e5d..d0c69a6c21 100644 --- a/indra/newview/skins/default/xui/pl/floater_pay_object.xml +++ b/indra/newview/skins/default/xui/pl/floater_pay_object.xml @@ -1,7 +1,7 @@ - Zapłać grupie + Zapłać Grupie Zapłać Rezydentowi @@ -11,7 +11,7 @@ [FIRST] [LAST] - Poprzez obiekt: + Poprzez Obiekt: diff --git a/indra/newview/skins/default/xui/pl/floater_post_process.xml b/indra/newview/skins/default/xui/pl/floater_post_process.xml index e3dce84933..a3515915bf 100644 --- a/indra/newview/skins/default/xui/pl/floater_post_process.xml +++ b/indra/newview/skins/default/xui/pl/floater_post_process.xml @@ -1,7 +1,7 @@ - + Jasność diff --git a/indra/newview/skins/default/xui/pl/floater_postcard.xml b/indra/newview/skins/default/xui/pl/floater_postcard.xml index fe796c6fa0..095974aa61 100644 --- a/indra/newview/skins/default/xui/pl/floater_postcard.xml +++ b/indra/newview/skins/default/xui/pl/floater_postcard.xml @@ -1,13 +1,13 @@ - Email odbiorcy: + Email Odbiorcy: - Twój email: + Twój Email: - Twoje dane: + Twoje Dane: Temat: @@ -20,7 +20,7 @@ Wpisz treść swojej wiadomości tutaj - Jeżeli odbiorca tej pocztówki dołączy do [SECOND_LIFE], otrzymasz bonus. + Jeżeli Odbiorca tej pocztówki dołączy do [SECOND_LIFE], otrzymasz bonus. - + - + diff --git a/indra/newview/skins/default/xui/pl/panel_script_limits_my_avatar.xml b/indra/newview/skins/default/xui/pl/panel_script_limits_my_avatar.xml index a52d8aed3d..e1863517a2 100644 --- a/indra/newview/skins/default/xui/pl/panel_script_limits_my_avatar.xml +++ b/indra/newview/skins/default/xui/pl/panel_script_limits_my_avatar.xml @@ -1,7 +1,7 @@ - Zużycie skryptów przez awatara + Zużycie Skryptów przez Awatara Ładowanie... @@ -9,7 +9,7 @@ - +