From 40b6cb754122f613c1f3018786f095691ec382ff Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 20 Jan 2010 15:14:38 -0500 Subject: For EXT-4222: Switching outfits sometimes causes me to wear both, and show previous outfit as worn. Postpone appearance change until wearables have resolved. --- indra/llcommon/llfasttimer.h | 30 +++--- indra/newview/llappearancemgr.cpp | 200 ++++++++++++++++++++++---------------- indra/newview/llappearancemgr.h | 38 +++++++- 3 files changed, 168 insertions(+), 100 deletions(-) diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index cd76bfe709..4874ece958 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -99,21 +99,21 @@ inline U64 get_cpu_clock_count_64() #else #define LL_INLINE #endif - -#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__)) -inline U32 get_cpu_clock_count_32() -{ - U64 x; - __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); - return (U32)x >> 8; -} - -inline U32 get_cpu_clock_count_64() -{ - U64 x; - __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); - return x >> 8; -} + +#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__)) +inline U32 get_cpu_clock_count_32() +{ + U64 x; + __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); + return (U32)x >> 8; +} + +inline U32 get_cpu_clock_count_64() +{ + U64 x; + __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); + return x >> 8; +} #endif #if ( LL_DARWIN && !(defined(__i386__) || defined(__amd64__))) || (LL_SOLARIS && defined(__sparc__)) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 748d8bdfbf..0d4e048dde 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -274,6 +274,7 @@ private: struct LLFoundData { + LLFoundData() {} LLFoundData(const LLUUID& item_id, const LLUUID& asset_id, const std::string& name, @@ -292,20 +293,81 @@ struct LLFoundData }; -struct LLWearableHoldingPattern +class LLWearableHoldingPattern { - LLWearableHoldingPattern() : mResolved(0) {} - ~LLWearableHoldingPattern() - { - for_each(mFoundList.begin(), mFoundList.end(), DeletePointer()); - mFoundList.clear(); - } - typedef std::list found_list_t; +public: + LLWearableHoldingPattern(); + ~LLWearableHoldingPattern(); + + bool pollCompletion(); + bool isDone(); + + typedef std::list found_list_t; found_list_t mFoundList; + LLInventoryModel::item_array_t mObjItems; + LLInventoryModel::item_array_t mGestItems; S32 mResolved; - bool append; + LLTimer mWaitTime; }; +LLWearableHoldingPattern::LLWearableHoldingPattern(): + mResolved(0) +{ + llwarns << "constructor" << llendl; +} + +LLWearableHoldingPattern::~LLWearableHoldingPattern() +{ + llwarns << "destructor" << llendl; +} + +bool LLWearableHoldingPattern::isDone() +{ + return (mResolved >= (S32)mFoundList.size()); +} + +bool LLWearableHoldingPattern::pollCompletion() +{ + bool done = isDone(); + llwarns << "polling, done status: " << done << llendl; + if (done) + { + // Activate all gestures in this folder + if (mGestItems.count() > 0) + { + llinfos << "Activating " << mGestItems.count() << " gestures" << llendl; + + LLGestureManager::instance().activateGestures(mGestItems); + + // Update the inventory item labels to reflect the fact + // they are active. + LLViewerInventoryCategory* catp = + gInventory.getCategory(LLAppearanceManager::instance().getCOF()); + + if (catp) + { + gInventory.updateCategory(catp); + gInventory.notifyObservers(); + } + } + + // Update attachments to match those requested. + LLVOAvatar* avatar = gAgent.getAvatarObject(); + if( avatar ) + { + llinfos << "Updating " << mObjItems.count() << " attachments" << llendl; + LLAgentWearables::userUpdateAttachments(mObjItems); + } + + // Update wearables. + llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; + LLAppearanceManager::instance().updateAgentWearables(this, false); + + delete this; + } + return done; +} + static void removeDuplicateItems(LLInventoryModel::item_array_t& items) { LLInventoryModel::item_array_t new_items; @@ -336,26 +398,21 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items) static void onWearableAssetFetch(LLWearable* wearable, void* data) { LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data; - bool append = holder->append; if(wearable) { for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin(); iter != holder->mFoundList.end(); ++iter) { - LLFoundData* data = *iter; - if(wearable->getAssetID() == data->mAssetID) + LLFoundData& data = *iter; + if(wearable->getAssetID() == data.mAssetID) { - data->mWearable = wearable; + data.mWearable = wearable; break; } } } holder->mResolved += 1; - if(holder->mResolved >= (S32)holder->mFoundList.size()) - { - LLAppearanceManager::instance().updateAgentWearables(holder, append); - } } LLUUID LLAppearanceManager::getCOF() @@ -662,12 +719,12 @@ void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin(); iter != holder->mFoundList.end(); ++iter) { - LLFoundData* data = *iter; - LLWearable* wearable = data->mWearable; + LLFoundData& data = *iter; + LLWearable* wearable = data.mWearable; if( wearable && ((S32)wearable->getType() == i) ) { LLViewerInventoryItem* item; - item = (LLViewerInventoryItem*)gInventory.getItem(data->mItemID); + item = (LLViewerInventoryItem*)gInventory.getItem(data.mItemID); if( item && (item->getAssetUUID() == wearable->getAssetID()) ) { items.put(item); @@ -683,8 +740,6 @@ void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, gAgentWearables.setWearableOutfit(items, wearables, !append); } - delete holder; - // dec_busy_count(); } @@ -706,86 +761,63 @@ void LLAppearanceManager::updateAppearanceFromCOF() LLInventoryModel::item_array_t gest_items; getUserDescendents(current_outfit_id, wear_items, obj_items, gest_items, follow_folder_links); - if( !wear_items.count() && !obj_items.count() && !gest_items.count()) + if(!wear_items.count()) { LLNotificationsUtil::add("CouldNotPutOnOutfit"); return; } - - // Processes that take time should show the busy cursor - //inc_busy_count(); // BAP this is currently a no-op in llinventorybridge.cpp - do we need it? - - // Activate all gestures in this folder - if (gest_items.count() > 0) - { - llinfos << "Activating " << gest_items.count() << " gestures" << llendl; - LLGestureManager::instance().activateGestures(gest_items); + LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; - // Update the inventory item labels to reflect the fact - // they are active. - LLViewerInventoryCategory* catp = gInventory.getCategory(current_outfit_id); - if (catp) + holder->mObjItems = obj_items; + holder->mGestItems = gest_items; + + // Note: can't do normal iteration, because if all the + // wearables can be resolved immediately, then the + // callback will be called (and this object deleted) + // before the final getNextData(). + LLDynamicArray found_container; + for(S32 i = 0; i < wear_items.count(); ++i) + { + LLViewerInventoryItem *item = wear_items.get(i); + LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL; + if (item && linked_item) { - gInventory.updateCategory(catp); - gInventory.notifyObservers(); + LLFoundData found(linked_item->getUUID(), + linked_item->getAssetUUID(), + linked_item->getName(), + linked_item->getType()); + holder->mFoundList.push_front(found); + found_container.put(found); } - } - - if(wear_items.count() > 0) - { - // Note: can't do normal iteration, because if all the - // wearables can be resolved immediately, then the - // callback will be called (and this object deleted) - // before the final getNextData(). - LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; - LLFoundData* found; - LLDynamicArray found_container; - for(S32 i = 0; i < wear_items.count(); ++i) + else { - LLViewerInventoryItem *item = wear_items.get(i); - LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL; - if (item && linked_item) + if (!item) { - found = new LLFoundData(linked_item->getUUID(), - linked_item->getAssetUUID(), - linked_item->getName(), - linked_item->getType()); - holder->mFoundList.push_front(found); - found_container.put(found); + llwarns << "attempt to wear a null item " << llendl; } - else + else if (!linked_item) { - if (!item) - { - llwarns << "attempt to wear a null item " << llendl; - } - else if (!linked_item) - { - llwarns << "attempt to wear a broken link " << item->getName() << llendl; - } + llwarns << "attempt to wear a broken link " << item->getName() << llendl; } } - for(S32 i = 0; i < found_container.count(); ++i) - { - holder->append = false; - found = found_container.get(i); - - // Fetch the wearables about to be worn. - LLWearableList::instance().getAsset(found->mAssetID, - found->mName, - found->mAssetType, - onWearableAssetFetch, - (void*)holder); - } } - // Update attachments to match those requested. - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if( avatar ) + for(S32 i = 0; i < found_container.count(); ++i) { - LLAgentWearables::userUpdateAttachments(obj_items); + LLFoundData& found = found_container.get(i); + + // Fetch the wearables about to be worn. + LLWearableList::instance().getAsset(found.mAssetID, + found.mName, + found.mAssetType, + onWearableAssetFetch, + (void*)holder); + } + + doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollCompletion,holder)); + } void LLAppearanceManager::getDescendentsOfAssetType(const LLUUID& category, diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 20745b70e4..517face777 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -39,7 +39,7 @@ #include "llcallbacklist.h" class LLWearable; -struct LLWearableHoldingPattern; +class LLWearableHoldingPattern; class LLAppearanceManager: public LLSingleton { @@ -168,4 +168,40 @@ void doOnIdle(T callable) gIdleCallbacks.addFunction(&OnIdleCallback::onIdle,cb_functor); } +// Shim class and template function to allow arbitrary boost::bind +// expressions to be run as recurring idle callbacks. +template +class OnIdleCallbackRepeating +{ +public: + OnIdleCallbackRepeating(T callable): + mCallable(callable) + { + } + // Will keep getting called until the callable returns false. + static void onIdle(void *data) + { + OnIdleCallbackRepeating* self = reinterpret_cast*>(data); + bool done = self->call(); + if (done) + { + gIdleCallbacks.deleteFunction(onIdle, data); + delete self; + } + } + bool call() + { + return mCallable(); + } +private: + T mCallable; +}; + +template +void doOnIdleRepeating(T callable) +{ + OnIdleCallbackRepeating* cb_functor = new OnIdleCallbackRepeating(callable); + gIdleCallbacks.addFunction(&OnIdleCallbackRepeating::onIdle,cb_functor); +} + #endif -- cgit v1.2.3 From a9871e8d258404ff32956b093c80b4cf56c3522c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 20 Jan 2010 17:59:16 -0500 Subject: For EXT-4222: Switching outfits sometimes causes me to wear both, and show previous outfit as worn. --- indra/newview/llappearancemgr.cpp | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 0d4e048dde..ccda737fc6 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -301,6 +301,7 @@ public: bool pollCompletion(); bool isDone(); + bool isTimedOut(); typedef std::list found_list_t; found_list_t mFoundList; @@ -313,12 +314,10 @@ public: LLWearableHoldingPattern::LLWearableHoldingPattern(): mResolved(0) { - llwarns << "constructor" << llendl; } LLWearableHoldingPattern::~LLWearableHoldingPattern() { - llwarns << "destructor" << llendl; } bool LLWearableHoldingPattern::isDone() @@ -326,10 +325,16 @@ bool LLWearableHoldingPattern::isDone() return (mResolved >= (S32)mFoundList.size()); } +bool LLWearableHoldingPattern::isTimedOut() +{ + static F32 max_wait_time = 5.0; // give up if wearable fetches haven't completed in max_wait_time seconds. + return mWaitTime.getElapsedTimeF32() > max_wait_time; +} + bool LLWearableHoldingPattern::pollCompletion() { bool done = isDone(); - llwarns << "polling, done status: " << done << llendl; + llinfos << "polling, done status: " << done << llendl; if (done) { // Activate all gestures in this folder @@ -350,6 +355,10 @@ bool LLWearableHoldingPattern::pollCompletion() gInventory.notifyObservers(); } } + + // Update wearables. + llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; + LLAppearanceManager::instance().updateAgentWearables(this, false); // Update attachments to match those requested. LLVOAvatar* avatar = gAgent.getAvatarObject(); @@ -359,13 +368,17 @@ bool LLWearableHoldingPattern::pollCompletion() LLAgentWearables::userUpdateAttachments(mObjItems); } - // Update wearables. - llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; - LLAppearanceManager::instance().updateAgentWearables(this, false); - delete this; + return done; + } + else if (isTimedOut()) + { + llwarns << "wearables taking too long to fetch for outfit, retrying updateAppearanceFromCOF()." << llendl; + delete this; + LLAppearanceManager::instance().updateAppearanceFromCOF(); + return true; } - return done; + return false; } static void removeDuplicateItems(LLInventoryModel::item_array_t& items) -- cgit v1.2.3 From 83670fc520cf8f4f78446f853cae584c2970f4fc Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 21 Jan 2010 09:53:18 -0500 Subject: For EXT-4222: Switching outfits sometimes causes me to wear both, and show previous outfit as worn. --- indra/newview/llappearancemgr.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index ccda737fc6..6972d4ec98 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -327,14 +327,14 @@ bool LLWearableHoldingPattern::isDone() bool LLWearableHoldingPattern::isTimedOut() { - static F32 max_wait_time = 5.0; // give up if wearable fetches haven't completed in max_wait_time seconds. + static F32 max_wait_time = 15.0; // give up if wearable fetches haven't completed in max_wait_time seconds. return mWaitTime.getElapsedTimeF32() > max_wait_time; } bool LLWearableHoldingPattern::pollCompletion() { bool done = isDone(); - llinfos << "polling, done status: " << done << llendl; + llinfos << "polling, done status: " << done << " elapsed " << mWaitTime.getElapsedTimeF32() << llendl; if (done) { // Activate all gestures in this folder @@ -829,7 +829,10 @@ void LLAppearanceManager::updateAppearanceFromCOF() } - doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollCompletion,holder)); + if (!holder->pollCompletion()) + { + doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollCompletion,holder)); + } } -- cgit v1.2.3 From bf1219eb59a9dbaebd3e2052963ded76bfcb0b21 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Thu, 21 Jan 2010 15:32:43 +0000 Subject: Fix for bug EXT-4421 (Parcel Voice settings not respected) Turns out the UI controls weren't hooked up to anything and so not showing that the parcel was actually voice enabled. Fixed by restoring the same functionality for these controls as in previous viewers, i.e. they now reflect the state of the current parcel, but are disabled when voice is disabled on the region. Reviewed by Lynx. --- indra/newview/llpanellandaudio.cpp | 62 +++++++++++----------- indra/newview/llpanellandaudio.h | 4 +- .../skins/default/xui/en/floater_about_land.xml | 3 +- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/indra/newview/llpanellandaudio.cpp b/indra/newview/llpanellandaudio.cpp index 920fca66f2..6a4c909759 100644 --- a/indra/newview/llpanellandaudio.cpp +++ b/indra/newview/llpanellandaudio.cpp @@ -37,6 +37,7 @@ // viewer includes #include "llmimetypes.h" #include "llviewerparcelmgr.h" +#include "llviewerregion.h" #include "lluictrlfactory.h" // library includes @@ -83,8 +84,14 @@ BOOL LLPanelLandAudio::postBuild() mCheckSoundLocal = getChild("check sound local"); childSetCommitCallback("check sound local", onCommitAny, this); - mRadioVoiceChat = getChild("parcel_voice_channel"); - childSetCommitCallback("parcel_voice_channel", onCommitAny, this); + mCheckParcelEnableVoice = getChild("parcel_enable_voice_channel"); + childSetCommitCallback("parcel_enable_voice_channel", onCommitAny, this); + + // This one is always disabled so no need for a commit callback + mCheckEstateDisabledVoice = getChild("parcel_enable_voice_channel_is_estate_disabled"); + + mCheckParcelVoiceLocal = getChild("parcel_enable_voice_channel_local"); + childSetCommitCallback("parcel_enable_voice_channel_local", onCommitAny, this); mMusicURLEdit = getChild("music_url"); childSetCommitCallback("music_url", onCommitAny, this); @@ -118,19 +125,33 @@ void LLPanelLandAudio::refresh() mMusicUrlCheck->set( parcel->getObscureMusic() ); mMusicUrlCheck->setEnabled( can_change_media ); - if(parcel->getParcelFlagAllowVoice()) + bool allow_voice = parcel->getParcelFlagAllowVoice(); + + LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + if (region && region->isVoiceEnabled()) { - if(parcel->getParcelFlagUseEstateVoiceChannel()) - mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatEstate); - else - mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatPrivate); + mCheckEstateDisabledVoice->setVisible(false); + + mCheckParcelEnableVoice->setVisible(true); + mCheckParcelEnableVoice->setEnabled( can_change_media ); + mCheckParcelEnableVoice->set(allow_voice); + + mCheckParcelVoiceLocal->setEnabled( can_change_media && allow_voice ); } else { - mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatDisable); + // Voice disabled at estate level, overrides parcel settings + // Replace the parcel voice checkbox with a disabled one + // labelled with an explanatory message + mCheckEstateDisabledVoice->setVisible(true); + + mCheckParcelEnableVoice->setVisible(false); + mCheckParcelEnableVoice->setEnabled(false); + mCheckParcelVoiceLocal->setEnabled(false); } - mRadioVoiceChat->setEnabled( can_change_media ); + mCheckParcelEnableVoice->set(allow_voice); + mCheckParcelVoiceLocal->set(!parcel->getParcelFlagUseEstateVoiceChannel()); mMusicURLEdit->setText(parcel->getMusicURL()); mMusicURLEdit->setEnabled( can_change_media ); @@ -149,30 +170,11 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) // Extract data from UI BOOL sound_local = self->mCheckSoundLocal->get(); - int voice_setting = self->mRadioVoiceChat->getSelectedIndex(); std::string music_url = self->mMusicURLEdit->getText(); U8 obscure_music = self->mMusicUrlCheck->get(); - - BOOL voice_enabled; - BOOL voice_estate_chan; - - switch(voice_setting) - { - default: - case kRadioVoiceChatEstate: - voice_enabled = TRUE; - voice_estate_chan = TRUE; - break; - case kRadioVoiceChatPrivate: - voice_enabled = TRUE; - voice_estate_chan = FALSE; - break; - case kRadioVoiceChatDisable: - voice_enabled = FALSE; - voice_estate_chan = FALSE; - break; - } + BOOL voice_enabled = self->mCheckParcelEnableVoice->get(); + BOOL voice_estate_chan = !self->mCheckParcelVoiceLocal->get(); // Remove leading/trailing whitespace (common when copying/pasting) LLStringUtil::trim(music_url); diff --git a/indra/newview/llpanellandaudio.h b/indra/newview/llpanellandaudio.h index de5da95fa4..19766a40b6 100644 --- a/indra/newview/llpanellandaudio.h +++ b/indra/newview/llpanellandaudio.h @@ -52,7 +52,9 @@ private: private: LLCheckBoxCtrl* mCheckSoundLocal; - LLRadioGroup* mRadioVoiceChat; + LLCheckBoxCtrl* mCheckParcelEnableVoice; + LLCheckBoxCtrl* mCheckEstateDisabledVoice; + LLCheckBoxCtrl* mCheckParcelVoiceLocal; LLLineEditor* mMusicURLEdit; LLCheckBoxCtrl* mMusicUrlCheck; diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index c58c1f00b9..61ca783d14 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1871,13 +1871,14 @@ Only large parcels can be listed in search. layout="topleft" left="110" name="parcel_enable_voice_channel_is_estate_disabled" + top_delta="0" width="300" /> Date: Thu, 21 Jan 2010 11:17:50 -0800 Subject: FIX EXT-2871 : Use "original texture" id in panelface if the current selected texture is a media texture Review #84 (Richard and Callum) --- indra/newview/llpanelface.cpp | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index ee0426c7df..8c5208678e 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -65,6 +65,7 @@ #include "llvovolume.h" #include "lluictrlfactory.h" #include "llpluginclassmedia.h" +#include "llviewertexturelist.h" // // Methods @@ -406,14 +407,40 @@ void LLPanelFace::getState() LLUUID id; struct f1 : public LLSelectedTEGetFunctor { - LLUUID get(LLViewerObject* object, S32 te) + LLUUID get(LLViewerObject* object, S32 te_index) { - LLViewerTexture* image = object->getTEImage(te); - return image ? image->getID() : LLUUID::null; + LLUUID id; + + LLViewerTexture* image = object->getTEImage(te_index); + if (image) id = image->getID(); + + if (!id.isNull() && LLViewerMedia::textureHasMedia(id)) + { + LLTextureEntry *te = object->getTE(te_index); + if (te) + { + LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID()) : NULL ; + if(!tex) + { + tex = LLViewerFetchedTexture::sDefaultImagep; + } + if (tex) + { + id = tex->getID(); + } + } + } + return id; } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, id ); + if(LLViewerMedia::textureHasMedia(id)) + { + childSetEnabled("textbox autofix",editable); + childSetEnabled("button align",editable); + } + if (identical) { // All selected have the same texture @@ -444,13 +471,6 @@ void LLPanelFace::getState() } } } - - if(LLViewerMedia::textureHasMedia(id)) - { - childSetEnabled("textbox autofix",editable); - childSetEnabled("button align",editable); - } - } -- cgit v1.2.3 From ccc90257e7622bcf35454e8d4a0780f020ee6c39 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 21 Jan 2010 15:57:06 -0500 Subject: For EXT-4222: Switching outfits sometimes causes me to wear both, and show previous outfit as worn. --- indra/newview/llappearancemgr.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 6972d4ec98..61d60fdff9 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -322,7 +322,15 @@ LLWearableHoldingPattern::~LLWearableHoldingPattern() bool LLWearableHoldingPattern::isDone() { - return (mResolved >= (S32)mFoundList.size()); + if (mResolved >= (S32)mFoundList.size()) + return true; // have everything we were waiting for + else if (isTimedOut()) + { + llwarns << "Exceeded max wait time, updating appearance based on what has arrived" << llendl; + return true; + } + return false; + } bool LLWearableHoldingPattern::isTimedOut() @@ -369,16 +377,8 @@ bool LLWearableHoldingPattern::pollCompletion() } delete this; - return done; } - else if (isTimedOut()) - { - llwarns << "wearables taking too long to fetch for outfit, retrying updateAppearanceFromCOF()." << llendl; - delete this; - LLAppearanceManager::instance().updateAppearanceFromCOF(); - return true; - } - return false; + return done; } static void removeDuplicateItems(LLInventoryModel::item_array_t& items) -- cgit v1.2.3 From a0666bdb70ebb6c6838c22829a4d25b6c2b4e517 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 21 Jan 2010 14:42:11 -0800 Subject: Turn on llassert() and llverify() for RelWithDebInfo builds. Convert top firing asserts into big warnings. To be reviewed by Mani. --- indra/llcommon/llerrorlegacy.h | 4 ++++ indra/newview/lltexlayer.cpp | 4 ++++ indra/newview/llviewertexture.cpp | 6 +++++- indra/newview/llviewertexturelist.cpp | 5 ++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/indra/llcommon/llerrorlegacy.h b/indra/llcommon/llerrorlegacy.h index 7a970b1466..9920921a58 100644 --- a/indra/llcommon/llerrorlegacy.h +++ b/indra/llcommon/llerrorlegacy.h @@ -75,6 +75,10 @@ const int LL_ERR_PRICE_MISMATCH = -23018; #define SHOW_ASSERT #else // _DEBUG +#ifdef LL_RELEASE_WITH_DEBUG_INFO +#define SHOW_ASSERT +#endif // LL_RELEASE_WITH_DEBUG_INFO + #ifdef RELEASE_SHOW_DEBUG #define SHOW_DEBUG #endif diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 4a7d784c3e..84c8b9d5f0 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -1140,6 +1140,10 @@ LLTexLayerInterface::LLTexLayerInterface(const LLTexLayerInterface &layer, LLWea BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions { //llassert(mInfo == NULL); // nyx says this is probably bogus but needs investigating + if (mInfo != NULL) // above llassert(), but softened into a warning + { + llwarns << "BAD STUFF! mInfo != NULL" << llendl; + } mInfo = info; //mID = info->mID; // No ID diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index ad993bc056..2544e46bab 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1560,7 +1560,11 @@ F32 LLViewerFetchedTexture::calcDecodePriority() void LLViewerFetchedTexture::setDecodePriority(F32 priority) { - llassert(!mInImageList); + //llassert(!mInImageList); // firing a lot, figure out why + if (!mInImageList) // above llassert() softened to a warning + { + llwarns << "BAD STUFF! mInImageList" << llendl; + } mDecodePriority = priority; } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 6bb547373c..e25ec8295c 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -519,7 +519,10 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image) } llerrs << "LLViewerTextureList::removeImageFromList - Image not in list" << llendl; } - llverify(mImageList.erase(image) == 1); + if (mImageList.erase(image) != 1) + { + llwarns << "BAD STUFF! mImageList.erase(image) != 1" << llendl; + } image->setInImageList(FALSE) ; } -- cgit v1.2.3 From 6a686700d0f51c02facb645208b7e21aa9b687d9 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 21 Jan 2010 15:23:09 -0800 Subject: Minor cleanup to the logic in LLViewerParcelMedia::play(), to prevent duplication of code. --- indra/newview/llviewerparcelmedia.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index e8b435fc8f..e87dbe5c07 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -212,22 +212,15 @@ void LLViewerParcelMedia::play(LLParcel* parcel) else { // Since the texture id is different, we need to generate a new impl - LL_DEBUGS("Media") << "new media impl with mime type " << mime_type << ", url " << media_url << LL_ENDL; // Delete the old one first so they don't fight over the texture. sMediaImpl = NULL; - - sMediaImpl = LLViewerMedia::newMediaImpl( - placeholder_texture_id, - media_width, - media_height, - media_auto_scale, - media_loop); - sMediaImpl->setIsParcelMedia(true); - sMediaImpl->navigateTo(media_url, mime_type, true); + + // A new impl will be created below. } } - else + + if(!sMediaImpl) { LL_DEBUGS("Media") << "new media impl with mime type " << mime_type << ", url " << media_url << LL_ENDL; -- cgit v1.2.3 From 96721b3cccee96574695764871c8ac92ee5bb845 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 21 Jan 2010 15:39:14 -0800 Subject: Partial fix for EXT-4508 (nearby media floater parcel media button breaks rtsp) This is actually two seperate issues: 1) After disabling parcel media from the nearby media floater, it can't be re-enabled 2) When you disable parcel media from the nearby media floater, faces displaying it don't revert to their original texture This change fixes issue (1), by forcing the priority of the inworld media instance to normal in LLViewerMedia::updateMedia() so it will always get reloaded instead of possibly being kept unloaded due to already-loaded prim media. Issue (2) is still under investigation. In addition to the case where you disable parcel media from the nearby media floater, it also doesn't restore the textures when you leave the parcel, and I think I've even seen it when unloading --- indra/newview/llviewermedia.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 04d67fe750..d712446d83 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -752,6 +752,11 @@ void LLViewerMedia::updateMedia(void *dummy_arg) new_priority = LLPluginClassMedia::PRIORITY_NORMAL; impl_count_interest_normal++; } + else if(pimpl->isParcelMedia()) + { + new_priority = LLPluginClassMedia::PRIORITY_NORMAL; + impl_count_interest_normal++; + } else { // Look at interest and CPU usage for instances that aren't in any of the above states. -- cgit v1.2.3 From c510fed273864fcfe299d276e55a52916c989b5f Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 21 Jan 2010 15:39:19 -0800 Subject: Soften another common llassert() failure to a warning. --- indra/newview/llviewertexturelist.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index e25ec8295c..ee934ab9c5 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -502,7 +502,10 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) { llerrs << "LLViewerTextureList::addImageToList - Image already in list" << llendl; } - llverify((mImageList.insert(image)).second == true); + if ((mImageList.insert(image)).second != true) + { + llwarns << "BAD STUFF! (mImageList.insert(image)).second != true" << llendl; + } image->setInImageList(TRUE) ; } -- cgit v1.2.3 From 906284b99ffbf5974cb41987a702b7e51957643a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 21 Jan 2010 16:26:37 -0800 Subject: Fix inverted logic from review. --- indra/newview/llviewertexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 2544e46bab..3f42cba561 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1561,7 +1561,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() void LLViewerFetchedTexture::setDecodePriority(F32 priority) { //llassert(!mInImageList); // firing a lot, figure out why - if (!mInImageList) // above llassert() softened to a warning + if (mInImageList) // above llassert() softened to a warning { llwarns << "BAD STUFF! mInImageList" << llendl; } -- cgit v1.2.3