From da40427a0be28de943988a4961c728384a453119 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 16 Jan 2012 14:27:35 -0500 Subject: STORM-1795 Ad-hoc messages are received even when "Only friends and groups can call or IM me" --- doc/contributions.txt | 1 + indra/newview/llimview.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 84f399cc89..9e662c72e2 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -607,6 +607,7 @@ Jonathan Yap STORM-1737 STORM-1733 STORM-1790 + STORM-1795 Kadah Coba STORM-1060 Jondan Lundquist diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a856bd0bdc..fa7930503b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2458,7 +2458,10 @@ void LLIMMgr::addMessage( make_ui_sound("UISndNewIncomingIMSession"); } - if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat)) + bool show_message = gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && + LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL ? false : true; + + if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && show_message) { LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg); } -- cgit v1.2.3 From f9a17df4d3ec9e0301b287e0a0df6ac1f8ede1ca Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 17 Jan 2012 23:17:52 +0200 Subject: EXP-1806 FIXED CTRL-W no longer closes floaters. Restoring accidentally removed code. --- indra/llui/llfloater.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 33548151fd..cedc4c0aee 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1681,6 +1681,8 @@ LLFloater* LLFloater::getClosableFloaterFromFocus() { if (it->hasFocus()) { + LLFloater& floater = *it; + focused_floater = &floater; break; } } -- cgit v1.2.3 From 3b81e882897e1b161e4becaafaf3fc93d482ce65 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 17 Jan 2012 23:20:44 +0200 Subject: EXP-1807 FIXED Linux viewer didn't start due to "libSDL-1.2.so.0: cannot open shared object file". Package the missing symlink. --- indra/newview/viewer_manifest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0931c4ec9b..089b17149d 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1047,6 +1047,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libuuid.so.16") self.path("libuuid.so.16.0.22") self.path("libSDL-1.2.so.0.11.3") + self.path("libSDL-1.2.so.0") self.path("libdirectfb-1.4.so.5.0.4") self.path("libfusion-1.4.so.5.0.4") self.path("libdirect-1.4.so.5.0.4") -- cgit v1.2.3 From 9025656bba1520b6b442ce0a359fad0217e6d970 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 17 Jan 2012 22:41:25 -0800 Subject: EXP-1773 : A bit of code cleanup and defensive coding in an attempt to alleviate some errand crashes. --- indra/llui/lluistring.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp index ac69d3bf85..c4e073ccdb 100644 --- a/indra/llui/lluistring.cpp +++ b/indra/llui/lluistring.cpp @@ -128,17 +128,13 @@ void LLUIString::updateResult() const } mResult = mOrig; - // get the defailt args + local args - if (!mArgs || mArgs->empty()) + // get the default args + local args + LLStringUtil::format_map_t combined_args = LLTrans::getDefaultArgs(); + if (mArgs && !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(mResult, combined_args); } void LLUIString::updateWResult() const -- cgit v1.2.3 From b75f495526b29fff826fa8bd4e89be7ddf6b2aee Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 18 Jan 2012 17:38:05 +0200 Subject: EXP-1813 FIXED Unpressable radio button in Preferences -> General. Made the radio group larger so that all its buttons become clickable. --- indra/newview/skins/default/xui/en/panel_preferences_general.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 9827180aa7..24882988b0 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -331,7 +331,7 @@ Away timeout: -- cgit v1.2.3 From 2b724e30cf49999f4a4def3d197d739ce2535016 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 18 Jan 2012 20:50:25 +0200 Subject: EXP-1814 FIXED Added copying the missing symlinks to Linux viewer lib dir. --- indra/newview/viewer_manifest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 089b17149d..9bf755c8f8 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1049,8 +1049,11 @@ class Linux_i686Manifest(LinuxManifest): self.path("libSDL-1.2.so.0.11.3") self.path("libSDL-1.2.so.0") self.path("libdirectfb-1.4.so.5.0.4") + self.path("libdirectfb-1.4.so.5") self.path("libfusion-1.4.so.5.0.4") + self.path("libfusion-1.4.so.5") self.path("libdirect-1.4.so.5.0.4") + self.path("libdirect-1.4.so.5") self.path("libopenjpeg.so.1.4.0") self.path("libopenjpeg.so.1") self.path("libopenjpeg.so") -- cgit v1.2.3 From 41a43a4125a69835e6a76f5792a267ba0797f41a Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 18 Jan 2012 21:04:19 +0200 Subject: EXP-1672 FIXED Defensive fix for the crash. Added disconnecting notifications manager callbacks. Added check to prevent calling the destroyed Notifications object. --- indra/newview/llnotificationmanager.cpp | 28 ++++++++++++++++++---------- indra/newview/llnotificationmanager.h | 5 +++++ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index 6105eff8ea..f792f53ac5 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -35,6 +35,7 @@ #include "llnotifications.h" #include +#include using namespace LLNotificationsUI; @@ -48,6 +49,10 @@ LLNotificationManager::LLNotificationManager() //-------------------------------------------------------------------------- LLNotificationManager::~LLNotificationManager() { + BOOST_FOREACH(listener_pair_t& pair, mChannelListeners) + { + pair.second.disconnect(); + } } //-------------------------------------------------------------------------- @@ -64,16 +69,16 @@ void LLNotificationManager::init() LLNotificationChannel::buildChannel("Browser", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "browser")); LLNotificationChannel::buildChannel("Outbox", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "outbox")); - LLNotifications::instance().getChannel("Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - LLNotifications::instance().getChannel("NotificationTips")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - LLNotifications::instance().getChannel("Group Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - LLNotifications::instance().getChannel("Alerts")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - LLNotifications::instance().getChannel("IM Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - LLNotifications::instance().getChannel("Offer")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); - LLNotifications::instance().getChannel("Hints")->connectChanged(boost::bind(&LLHintHandler::processNotification, LLHintHandler::getInstance(), _1)); - LLNotifications::instance().getChannel("Browser")->connectChanged(boost::bind(&LLBrowserNotification::processNotification, LLBrowserNotification::getInstance(), _1)); - LLNotifications::instance().getChannel("Outbox")->connectChanged(boost::bind(&LLOutboxNotification::processNotification, LLOutboxNotification::getInstance(), _1)); + mChannelListeners["Notifications"] = LLNotifications::instance().getChannel("Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); + mChannelListeners["NotificationTips"] = LLNotifications::instance().getChannel("NotificationTips")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); + mChannelListeners["Group Notifications"] = LLNotifications::instance().getChannel("Group Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); + mChannelListeners["Alerts"] = LLNotifications::instance().getChannel("Alerts")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); + mChannelListeners["AlertModal"] = LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); + mChannelListeners["IM Notifications"] = LLNotifications::instance().getChannel("IM Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); + mChannelListeners["Offer"] = LLNotifications::instance().getChannel("Offer")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); + mChannelListeners["Hints"] = LLNotifications::instance().getChannel("Hints")->connectChanged(boost::bind(&LLHintHandler::processNotification, LLHintHandler::getInstance(), _1)); + mChannelListeners["Browser"] = LLNotifications::instance().getChannel("Browser")->connectChanged(boost::bind(&LLBrowserNotification::processNotification, LLBrowserNotification::getInstance(), _1)); + mChannelListeners["Outbox"] = LLNotifications::instance().getChannel("Outbox")->connectChanged(boost::bind(&LLOutboxNotification::processNotification, LLOutboxNotification::getInstance(), _1)); mNotifyHandlers["notify"] = boost::shared_ptr(new LLScriptHandler(NT_NOTIFY, LLSD())); mNotifyHandlers["notifytip"] = boost::shared_ptr(new LLTipHandler(NT_NOTIFY, LLSD())); @@ -92,6 +97,9 @@ bool LLNotificationManager::onNotification(const LLSD& notify) { LLSysHandler* handle = NULL; + if (LLNotifications::destroyed()) + return false; + LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); if (!notification) diff --git a/indra/newview/llnotificationmanager.h b/indra/newview/llnotificationmanager.h index 16e82e4cce..27b6ba1c71 100644 --- a/indra/newview/llnotificationmanager.h +++ b/indra/newview/llnotificationmanager.h @@ -28,6 +28,8 @@ #ifndef LL_LLNOTIFICATIONMANAGER_H #define LL_LLNOTIFICATIONMANAGER_H +#include "llevents.h" + #include "lluictrl.h" #include "llnotificationhandler.h" @@ -47,6 +49,7 @@ class LLToast; class LLNotificationManager : public LLSingleton { typedef std::pair eventhandlers; + typedef std::pair listener_pair_t; public: LLNotificationManager(); virtual ~LLNotificationManager(); @@ -70,6 +73,8 @@ private: //TODO (*) std::map > mNotifyHandlers; // cruft std::map mChatHandlers; + + std::map mChannelListeners; }; } -- cgit v1.2.3 From 916d61e4600df58329524e59c06d9621cab02393 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 18 Jan 2012 15:59:08 -0800 Subject: Fix Linux compilation failure --- indra/llui/lllayoutstack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 9909032707..34d13610b7 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -417,14 +417,14 @@ void LLLayoutStack::updateLayout() if (mOrientation == HORIZONTAL) { resize_bar_rect.mLeft = panel_rect.mRight - mResizeBarOverlap; - resize_bar_rect.mRight = panel_rect.mRight + panel_spacing + mResizeBarOverlap; + resize_bar_rect.mRight = panel_rect.mRight + (S32)(llround(panel_spacing)) + mResizeBarOverlap; cur_pos += panel_visible_dim + panel_spacing; } else //VERTICAL { resize_bar_rect.mTop = panel_rect.mBottom + mResizeBarOverlap; - resize_bar_rect.mBottom = panel_rect.mBottom - panel_spacing - mResizeBarOverlap; + resize_bar_rect.mBottom = panel_rect.mBottom - (S32)(llround(panel_spacing)) - mResizeBarOverlap; cur_pos -= panel_visible_dim + panel_spacing; } -- cgit v1.2.3 From 3a597af700e55e2017c85220b2b97cc9f3aef9aa Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 18 Jan 2012 16:30:53 -0800 Subject: EXP-1513 FIX Underscore ( _ ) fails to show in first chat entry in Local Chat fixed font metrics rounding error and made corrective adjustments in layout --- indra/llrender/llfontgl.cpp | 18 +++++++++--------- indra/llui/llmenugl.cpp | 8 ++++---- indra/llui/llscrolllistcell.cpp | 2 +- indra/newview/llfloatermediasettings.cpp | 6 ++++++ indra/newview/llfloatermediasettings.h | 1 + indra/newview/llfloatertools.cpp | 5 ++++- indra/newview/llhudrender.cpp | 2 +- indra/newview/llhudtext.cpp | 6 ++---- indra/newview/llpanelgrouproles.cpp | 5 ++++- indra/newview/llpanelvoiceeffect.cpp | 1 - .../skins/default/xui/en/floater_about_land.xml | 2 +- .../skins/default/xui/en/floater_test_textbox.xml | 15 ++++++--------- indra/newview/skins/default/xui/en/inspect_object.xml | 1 + .../skins/default/xui/en/panel_navigation_bar.xml | 5 +++-- .../skins/default/xui/en/panel_preferences_sound.xml | 2 +- indra/newview/skins/default/xui/en/widgets/button.xml | 2 +- .../newview/skins/default/xui/en/widgets/check_box.xml | 2 +- 17 files changed, 46 insertions(+), 37 deletions(-) diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 82e8227ffe..12f86cf599 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -218,13 +218,13 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons switch (valign) { case TOP: - cur_y -= mFontFreetype->getAscenderHeight(); + cur_y -= getAscenderHeight(); break; case BOTTOM: - cur_y += mFontFreetype->getDescenderHeight(); + cur_y += getDescenderHeight(); break; case VCENTER: - cur_y -= (mFontFreetype->getAscenderHeight() - mFontFreetype->getDescenderHeight()) / 2.f; + cur_y -= (getAscenderHeight() - getDescenderHeight()) / 2.f; break; case BASELINE: // Baseline, do nothing. @@ -390,12 +390,12 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons //FIXME: add underline as glyph? if (style_to_add & UNDERLINE) { - F32 descender = mFontFreetype->getDescenderHeight(); + F32 descender = (F32)llfloor(mFontFreetype->getDescenderHeight()); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.begin(LLRender::LINES); - gGL.vertex2f(start_x, cur_y - (descender)); - gGL.vertex2f(cur_x, cur_y - (descender)); + gGL.vertex2f(start_x, cur_y - descender); + gGL.vertex2f(cur_x, cur_y - descender); gGL.end(); } @@ -446,17 +446,17 @@ S32 LLFontGL::renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y // font metrics - override for LLFontFreetype that returns units of virtual pixels F32 LLFontGL::getLineHeight() const { - return (F32)llround(mFontFreetype->getLineHeight() / sScaleY); + return (F32)llceil(mFontFreetype->getLineHeight() / sScaleY); } F32 LLFontGL::getAscenderHeight() const { - return (F32)llround(mFontFreetype->getAscenderHeight() / sScaleY); + return (F32)llceil(mFontFreetype->getAscenderHeight() / sScaleY); } F32 LLFontGL::getDescenderHeight() const { - return (F32)llround(mFontFreetype->getDescenderHeight() / sScaleY); + return (F32)llceil(mFontFreetype->getDescenderHeight() / sScaleY); } S32 LLFontGL::getWidth(const std::string& utf8text) const diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 95ecbb1c94..c624ae2e92 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -508,19 +508,19 @@ void LLMenuItemGL::draw( void ) { if( !mDrawBoolLabel.empty() ) { - mFont->render( mDrawBoolLabel.getWString(), 0, (F32)LEFT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f) + 1.f, color, + mFont->render( mDrawBoolLabel.getWString(), 0, (F32)LEFT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } - mFont->render( mLabel.getWString(), 0, (F32)LEFT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f) + 1.f, color, + mFont->render( mLabel.getWString(), 0, (F32)LEFT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); if( !mDrawAccelLabel.empty() ) { - mFont->render( mDrawAccelLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f) + 1.f, color, + mFont->render( mDrawAccelLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } if( !mDrawBranchLabel.empty() ) { - mFont->render( mDrawBranchLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f) + 1.f, color, + mFont->render( mDrawBranchLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color, LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } } diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp index 9d25c7180d..b087602a56 100644 --- a/indra/llui/llscrolllistcell.cpp +++ b/indra/llui/llscrolllistcell.cpp @@ -329,7 +329,7 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col break; } mFont->render(mText.getWString(), 0, - start_x, 2.f, + start_x, 0.f, display_color, mFontAlignment, LLFontGL::BOTTOM, diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 895e16adef..4f2a6ec1b7 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -312,3 +312,9 @@ bool LLFloaterMediaSettings::haveValuesChanged() const return values_changed; } +bool LLFloaterMediaSettings::instanceExists() +{ + return LLFloaterReg::findTypedInstance("media_settings"); +} + + diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h index ecc55d2cbc..1d25530986 100644 --- a/indra/newview/llfloatermediasettings.h +++ b/indra/newview/llfloatermediasettings.h @@ -45,6 +45,7 @@ public: /*virtual*/ void onClose(bool app_quitting); static LLFloaterMediaSettings* getInstance(); + static bool instanceExists(); static void apply(); static void initValues( const LLSD& media_settings , bool editable); static void clearValues( bool editable); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index bd5b5f4eb0..0d37d0857e 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1144,7 +1144,7 @@ void LLFloaterTools::updateLandImpacts() childSetTextArg("remaining_capacity", "[CAPACITY_STRING]", remaining_capacity_str); // Update land impacts info in the weights floater - LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::getTypedInstance("object_weights"); + LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::findTypedInstance("object_weights"); if(object_weights_floater) { object_weights_floater->updateLandImpacts(parcel); @@ -1153,6 +1153,8 @@ void LLFloaterTools::updateLandImpacts() void LLFloaterTools::getMediaState() { + if (!LLFloaterMediaSettings::instanceExists()) return; + LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection(); LLViewerObject* first_object = selected_objects->getFirstObject(); LLTextBox* media_info = getChild("media_info"); @@ -1234,6 +1236,7 @@ void LLFloaterTools::getMediaState() } } func; + // check if all faces have media(or, all dont have media) LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo = selected_objects->getSelectedTEValue( &func, bool_has_media ); diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index 122711a86d..dff310ecf9 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -138,7 +138,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, LLUI::translate((F32) winX*1.0f/LLFontGL::sScaleX, (F32) winY*1.0f/(LLFontGL::sScaleY), -(((F32) winZ*2.f)-1.f)); F32 right_x; - font.render(wstr, 0, 0, 0, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x); + font.render(wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x); LLUI::popMatrix(); gGL.popMatrix(); diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 24a876c59a..f116c8ee6e 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -227,7 +227,7 @@ void LLHUDText::renderText() segment_iter != mTextSegments.end(); ++segment_iter ) { const LLFontGL* fontp = segment_iter->mFont; - y_offset -= fontp->getLineHeight(); + y_offset -= fontp->getLineHeight() - 1; U8 style = segment_iter->mStyle; LLFontGL::ShadowType shadow = LLFontGL::DROP_SHADOW; @@ -480,8 +480,6 @@ void LLHUDText::updateSize() F32 width = 0.f; S32 max_lines = getMaxLines(); - //S32 lines = (max_lines < 0) ? (S32)mTextSegments.size() : llmin((S32)mTextSegments.size(), max_lines); - //F32 height = (F32)mFontp->getLineHeight() * (lines + mLabelSegments.size()); S32 start_segment; if (max_lines < 0) start_segment = 0; @@ -491,7 +489,7 @@ void LLHUDText::updateSize() while (iter != mTextSegments.end()) { const LLFontGL* fontp = iter->mFont; - height += fontp->getLineHeight(); + height += fontp->getLineHeight() - 1; width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH)); ++iter; } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index fbe331c7ab..f825ee3215 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -749,7 +749,10 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() { - gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); + if (mMembersList) + { + gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); + } } BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp index 4bbfec8ab7..5fec6d967d 100644 --- a/indra/newview/llpanelvoiceeffect.cpp +++ b/indra/newview/llpanelvoiceeffect.cpp @@ -123,7 +123,6 @@ void LLPanelVoiceEffect::update(bool list_updated) if (mVoiceEffectCombo) { LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - llassert(effect_interface); if (!effect_interface) return; if (list_updated) { 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 d198cd65a8..28538f7852 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -192,7 +192,7 @@ type="string" length="1" follows="left|top" - height="20" + height="18" layout="topleft" left_pad="2" valign="center" diff --git a/indra/newview/skins/default/xui/en/floater_test_textbox.xml b/indra/newview/skins/default/xui/en/floater_test_textbox.xml index 2df9bb35fe..3d1bc0edae 100644 --- a/indra/newview/skins/default/xui/en/floater_test_textbox.xml +++ b/indra/newview/skins/default/xui/en/floater_test_textbox.xml @@ -14,15 +14,12 @@ height="90" layout="topleft" left="10" + valign="bottom" + clip="true" top_pad="30" width="300"> - First line of multiple lines -Second line of multiple lines -Third line of multiple lines -Fourth line of multiple lines -Fifth line of multiple lines - - + +--> diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml index 8d14c974b4..b122e1bcff 100644 --- a/indra/newview/skins/default/xui/en/inspect_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_object.xml @@ -90,6 +90,7 @@ L$30,000 follows="all" font="SansSerifSmall" height="13" + clip="false" name="object_media_url" width="207" left_pad="2" diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 4bf420b79f..bb942f2c81 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -174,13 +174,14 @@ width="311"> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 1f92244eb9..b71586aab1 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -63,7 +63,7 @@ layout="topleft" left_pad="0" name="mute_chb_label" - top_delta="0" + top_delta="-1" width="150" wrap="true"> Mute when minimized diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml index e2baba92a3..589117fe4c 100644 --- a/indra/newview/skins/default/xui/en/widgets/button.xml +++ b/indra/newview/skins/default/xui/en/widgets/button.xml @@ -21,7 +21,7 @@ font="SansSerifSmall" hover_glow_amount="0.15" halign="center" - pad_bottom="3" + pad_bottom="2" height="23" scale_image="true" handle_right_mouse="true" diff --git a/indra/newview/skins/default/xui/en/widgets/check_box.xml b/indra/newview/skins/default/xui/en/widgets/check_box.xml index cca64fad2a..8947024e45 100644 --- a/indra/newview/skins/default/xui/en/widgets/check_box.xml +++ b/indra/newview/skins/default/xui/en/widgets/check_box.xml @@ -10,7 +10,7 @@ text_readonly_color="LabelDisabledColor"/> Date: Wed, 18 Jan 2012 16:32:37 -0800 Subject: added comments to magic numbers --- indra/newview/llhudtext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index f116c8ee6e..579b6008ae 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -227,7 +227,7 @@ void LLHUDText::renderText() segment_iter != mTextSegments.end(); ++segment_iter ) { const LLFontGL* fontp = segment_iter->mFont; - y_offset -= fontp->getLineHeight() - 1; + y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics U8 style = segment_iter->mStyle; LLFontGL::ShadowType shadow = LLFontGL::DROP_SHADOW; @@ -489,7 +489,7 @@ void LLHUDText::updateSize() while (iter != mTextSegments.end()) { const LLFontGL* fontp = iter->mFont; - height += fontp->getLineHeight() - 1; + height += fontp->getLineHeight() - 1; // correction factor to match legacy font metrics width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH)); ++iter; } -- cgit v1.2.3 From 19320842ebc39c1b528a2107323f9e918d688177 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 19 Jan 2012 16:57:09 +0200 Subject: EXP-1767 FIXED Received Items panel state being persistent between sessions. Added a setting to store the panel state. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llsidepanelinventory.cpp | 10 ++++++---- indra/newview/skins/default/xui/en/sidepanel_inventory.xml | 1 + 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 28ba9fd704..62b8052a50 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4259,6 +4259,17 @@ Boolean Value 0 + + InventoryInboxToggleState + + Comment + Stores the open/closed state of inventory Received items panel + Persist + 1 + Type + Boolean + Value + 0 InventoryLinking diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 3761eb5777..e1043c34c7 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -220,15 +220,17 @@ BOOL LLSidepanelInventory::postBuild() // Disable user_resize on main inventory panel by default inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false); - // Collapse inbox panel - inv_stack->collapsePanel(getChild(INBOX_LAYOUT_PANEL_NAME), true); - // Set up button states and callbacks LLButton * inbox_button = getChild(INBOX_BUTTON_NAME); - inbox_button->setToggleState(false); inbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this)); + // Get the previous inbox state from "InventoryInboxToggleState" setting. + bool is_inbox_collapsed = !inbox_button->getToggleState(); + + // Restore the collapsed inbox panel state + inv_stack->collapsePanel(getChild(INBOX_LAYOUT_PANEL_NAME), is_inbox_collapsed); + // Set the inbox visible based on debug settings (final setting comes from http request below) enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index fcba937bdb..1e06a60f55 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -73,6 +73,7 @@ Received items ([NUM]) Received items + -- cgit v1.2.3 From bb1a1f9d01fdbc377ca61f52041f66a86b974086 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 10 Feb 2012 14:28:16 -0600 Subject: SH-2963 Fix for highlight transparent not highlighting 100% transparent objects. --- indra/newview/lldrawpool.h | 1 + indra/newview/lldrawpoolalpha.cpp | 1 + indra/newview/llvovolume.cpp | 10 +++++++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h index 5a2981e749..64774d06df 100644 --- a/indra/newview/lldrawpool.h +++ b/indra/newview/lldrawpool.h @@ -133,6 +133,7 @@ public: PASS_ALPHA, PASS_ALPHA_MASK, PASS_FULLBRIGHT_ALPHA_MASK, + PASS_ALPHA_INVISIBLE, NUM_RENDER_TYPES, }; diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index ddb7d3ceeb..5b62dbc560 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -337,6 +337,7 @@ void LLDrawPoolAlpha::render(S32 pass) pushBatches(LLRenderPass::PASS_ALPHA_MASK, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE); pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE); + pushBatches(LLRenderPass::PASS_ALPHA_INVISIBLE, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE); if(shaders) { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 6354230796..438d578ac5 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4433,10 +4433,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) else { if (te->getColor().mV[3] > 0.f) - { + { //only treat as alpha in the pipeline if < 100% transparent drawablep->setState(LLDrawable::HAS_ALPHA); - alpha_faces.push_back(facep); } + alpha_faces.push_back(facep); } } else @@ -4952,7 +4952,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: if (is_alpha) { // can we safely treat this as an alpha mask? - if (facep->canRenderAsMask()) + if (facep->getFaceColor().mV[3] <= 0.f) + { //100% transparent, don't render unless we're highlighting transparent + registerFace(group, facep, LLRenderPass::PASS_ALPHA_INVISIBLE); + } + else if (facep->canRenderAsMask()) { if (te->getFullbright() || LLPipeline::sNoAlpha) { -- cgit v1.2.3 From c6acd4723526ed82e79dccef18aaf4821e53dfeb Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 8 Feb 2012 15:14:03 -0600 Subject: SH-2592 Fix for some shader uniforms using the wrong vector size. --- indra/newview/app_settings/shaders/class1/deferred/skyV.glsl | 2 -- indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl | 4 ++-- indra/newview/app_settings/shaders/class2/windlight/skyV.glsl | 2 -- indra/newview/llwaterparammanager.cpp | 2 +- indra/newview/llwlparamset.cpp | 4 ++-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl index 2c8808bdce..cb7603f4fd 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl @@ -55,8 +55,6 @@ uniform vec4 glow; uniform vec4 cloud_color; -uniform vec4 cloud_scale; - void main() { diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index 2406359721..c1dd45cd67 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -60,7 +60,7 @@ uniform vec4 glow; uniform vec4 cloud_color; -uniform vec4 cloud_scale; +uniform float cloud_scale; void main() { @@ -169,7 +169,7 @@ void main() // Texture coords vary_texcoord0 = texcoord0; vary_texcoord0.xy -= 0.5; - vary_texcoord0.xy /= cloud_scale.x; + vary_texcoord0.xy /= cloud_scale; vary_texcoord0.xy += 0.5; vary_texcoord1 = vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl index 6a87caa8cf..3788ddaf2d 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl @@ -53,8 +53,6 @@ uniform vec4 glow; uniform vec4 cloud_color; -uniform vec4 cloud_scale; - void main() { diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 20b34637b8..e386112334 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -194,7 +194,7 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader) shader->uniform4fv("waterPlane", 1, mWaterPlane.mV); shader->uniform1f("waterFogDensity", getFogDensity()); shader->uniform1f("waterFogKS", mWaterFogKS); - shader->uniform4f("distance_multiplier", 0, 0, 0, 0); + shader->uniform1f("distance_multiplier", 0); } } diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp index 1e95b3ea4a..b04d30db55 100644 --- a/indra/newview/llwlparamset.cpp +++ b/indra/newview/llwlparamset.cpp @@ -75,9 +75,9 @@ void LLWLParamSet::update(LLGLSLShader * shader) const stop_glerror(); } else if (param == "cloud_scale" || param == "cloud_shadow" || - param == "density_multiplier" || + param == "density_multiplier" || param == "distance_multiplier" || param == "haze_density" || param == "haze_horizon" || - param == "max_y") + param == "max_y" ) { F32 val = (F32) i->second[0].asReal(); -- cgit v1.2.3 From 1f5c2c056ff2b660b053cf3a7344fdf1c5c15b0e Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 8 Feb 2012 18:25:35 -0500 Subject: STORM-1808 Indicate ability to build --- doc/contributions.txt | 1 + indra/newview/app_settings/commands.xml | 2 ++ indra/newview/llagent.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index c5db396c97..bbaee68d02 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -610,6 +610,7 @@ Jonathan Yap STORM-1788 STORM-1799 STORM-1796 + STORM-1808 Kadah Coba STORM-1060 Jondan Lundquist diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 1d1d39c786..16a7e0b314 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -37,6 +37,8 @@ tooltip_ref="Command_Build_Tooltip" execute_function="Build.Toggle" execute_parameters="build" + is_enabled_function="Agent.IsActionAllowed" + is_enabled_parameters="build" is_running_function="Floater.IsOpen" is_running_parameters="build" /> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ab9b5ff436..f0add8ddc4 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -171,7 +171,7 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) if (param == "build") { - retval = gAgent.canEditParcel(); + retval = LLViewerParcelMgr::getInstance()->allowAgentBuild(); } else if (param == "speak") { -- cgit v1.2.3 From e482e677b2dece8cc46008f4fb05e4927ec70b4e Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 8 Feb 2012 16:51:19 -0800 Subject: EXP-1767 WIP Received Items panel state does not persist between sessions fixed layout stack so programmatic size updates will work correctly --- indra/llui/lllayoutstack.cpp | 68 ++++++++++++++-------- indra/llui/lllayoutstack.h | 1 + .../skins/default/xui/en/floater_test_toolbar.xml | 8 +-- 3 files changed, 50 insertions(+), 27 deletions(-) diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 31e0434753..ae262f794e 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -252,7 +252,7 @@ void LLLayoutStack::removeChild(LLView* view) { mPanels.erase(std::find(mPanels.begin(), mPanels.end(), embedded_panelp)); delete embedded_panelp; - normalizeFractionalSizes(); + updateFractionalSizes(); mNeedsLayout = true; } @@ -277,7 +277,7 @@ bool LLLayoutStack::addChild(LLView* child, S32 tab_group) } BOOL result = LLView::addChild(child, tab_group); - normalizeFractionalSizes(); + updateFractionalSizes(); return result; } @@ -491,35 +491,48 @@ void LLLayoutStack::updateClass() } } -void LLLayoutStack::normalizeFractionalSizes() +void LLLayoutStack::updateFractionalSizes() { - F32 total_resizable_dim = 0; - S32 num_auto_resize_panels = 0; + F32 total_resizable_dim = 0.f; BOOST_FOREACH(LLLayoutPanel* panelp, mPanels) { if (panelp->mAutoResize) { total_resizable_dim += llmax(0, panelp->getLayoutDim() - panelp->getRelevantMinDim()); - num_auto_resize_panels++; } } - F32 total_fractional_size = 0.f; - BOOST_FOREACH(LLLayoutPanel* panelp, mPanels) { if (panelp->mAutoResize) { F32 panel_resizable_dim = llmax(MIN_FRACTIONAL_SIZE, (F32)(panelp->getLayoutDim() - panelp->getRelevantMinDim())); panelp->mFractionalSize = panel_resizable_dim > 0.f - ? llclamp(panel_resizable_dim / total_resizable_dim, MIN_FRACTIONAL_SIZE, MAX_FRACTIONAL_SIZE) - : MIN_FRACTIONAL_SIZE; - total_fractional_size += panelp->mFractionalSize; + ? llclamp(panel_resizable_dim / total_resizable_dim, MIN_FRACTIONAL_SIZE, MAX_FRACTIONAL_SIZE) + : MIN_FRACTIONAL_SIZE; llassert(!llisnan(panelp->mFractionalSize)); } } + normalizeFractionalSizes(); +} + + +void LLLayoutStack::normalizeFractionalSizes() +{ + S32 num_auto_resize_panels = 0; + F32 total_fractional_size = 0.f; + + BOOST_FOREACH(LLLayoutPanel* panelp, mPanels) + { + if (panelp->mAutoResize) + { + total_fractional_size += panelp->mFractionalSize; + num_auto_resize_panels++; + } + } + if (total_fractional_size == 0.f) { // equal distribution BOOST_FOREACH(LLLayoutPanel* panelp, mPanels) @@ -631,7 +644,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& F32 total_visible_fraction = 0.f; F32 delta_auto_resize_headroom = 0.f; - F32 total_auto_resize_headroom = 0.f; + F32 original_auto_resize_headroom = 0.f; LLLayoutPanel* other_resize_panel = NULL; LLLayoutPanel* following_panel = NULL; @@ -640,8 +653,11 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& { if (panelp->mAutoResize) { - total_auto_resize_headroom += (F32)(panelp->mTargetDim - panelp->getRelevantMinDim()); - total_visible_fraction += panelp->mFractionalSize * panelp->getAutoResizeFactor(); + original_auto_resize_headroom += (F32)(panelp->mTargetDim - panelp->getRelevantMinDim()); + if (panelp->getVisible() && !panelp->mCollapsed) + { + total_visible_fraction += panelp->mFractionalSize; + } } if (panelp == resized_panel) @@ -655,18 +671,25 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& } } - if (resized_panel->mAutoResize == FALSE) + + if (resized_panel->mAutoResize) { - delta_auto_resize_headroom += -delta_dim; + if (!other_resize_panel || !other_resize_panel->mAutoResize) + { + delta_auto_resize_headroom += delta_dim; + } } - if (other_resize_panel && other_resize_panel->mAutoResize == FALSE) + else { - delta_auto_resize_headroom += delta_dim; + if (!other_resize_panel || other_resize_panel->mAutoResize) + { + delta_auto_resize_headroom -= delta_dim; + } } F32 fraction_given_up = 0.f; F32 fraction_remaining = 1.f; - F32 updated_auto_resize_headroom = total_auto_resize_headroom + delta_auto_resize_headroom; + F32 updated_auto_resize_headroom = original_auto_resize_headroom + delta_auto_resize_headroom; enum { @@ -692,14 +715,13 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& { // freeze current size as fraction of overall auto_resize space F32 fractional_adjustment_factor = updated_auto_resize_headroom == 0.f ? 1.f - : total_auto_resize_headroom / updated_auto_resize_headroom; + : original_auto_resize_headroom / updated_auto_resize_headroom; F32 new_fractional_size = llclamp(panelp->mFractionalSize * fractional_adjustment_factor, MIN_FRACTIONAL_SIZE, MAX_FRACTIONAL_SIZE); - F32 fraction_delta = (new_fractional_size - panelp->mFractionalSize); - fraction_given_up -= fraction_delta; + fraction_given_up -= new_fractional_size - panelp->mFractionalSize; fraction_remaining -= panelp->mFractionalSize; - panelp->mFractionalSize += fraction_delta; + panelp->mFractionalSize = new_fractional_size; llassert(!llisnan(panelp->mFractionalSize)); } else diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 4a8702e318..d32caec5f9 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -111,6 +111,7 @@ private: LLLayoutPanel* findEmbeddedPanel(LLPanel* panelp) const; LLLayoutPanel* findEmbeddedPanelByName(const std::string& name) const; + void updateFractionalSizes(); void normalizeFractionalSizes(); void updatePanelRect( LLLayoutPanel* param1, const LLRect& new_rect ); diff --git a/indra/newview/skins/default/xui/en/floater_test_toolbar.xml b/indra/newview/skins/default/xui/en/floater_test_toolbar.xml index 0c41c3ba2f..067c1fed82 100644 --- a/indra/newview/skins/default/xui/en/floater_test_toolbar.xml +++ b/indra/newview/skins/default/xui/en/floater_test_toolbar.xml @@ -7,7 +7,7 @@ name="floater_test_toolbar" translate="false" width="500"> - + - + -- cgit v1.2.3 From 41bc3eded93b1af306d492d40646c5cff34afd1c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 9 Feb 2012 11:32:40 -0800 Subject: EXP-1880 WIP Update Media affects framerate even when Media is disabled. --- indra/newview/llviewermedia.cpp | 43 ++++++++++++++--------------------------- indra/newview/llviewermedia.h | 3 --- 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index d7e79351c2..efc725896f 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -387,7 +387,6 @@ class LLViewerMediaMuteListObserver : public LLMuteListObserver static LLViewerMediaMuteListObserver sViewerMediaMuteListObserver; static bool sViewerMediaMuteListObserverInitialized = false; -static bool sInWorldMediaDisabled = false; ////////////////////////////////////////////////////////////////////////////////////////// @@ -652,20 +651,6 @@ void LLViewerMedia::muteListChanged() } } -////////////////////////////////////////////////////////////////////////////////////////// -// static -void LLViewerMedia::setInWorldMediaDisabled(bool disabled) -{ - sInWorldMediaDisabled = disabled; -} - -////////////////////////////////////////////////////////////////////////////////////////// -// static -bool LLViewerMedia::getInWorldMediaDisabled() -{ - return sInWorldMediaDisabled; -} - ////////////////////////////////////////////////////////////////////////////////////////// // static bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &object_interest) @@ -1568,7 +1553,6 @@ LLPluginClassMedia* LLViewerMedia::getSpareBrowserMediaSource() bool LLViewerMedia::hasInWorldMedia() { - if (sInWorldMediaDisabled) return false; impl_list::iterator iter = sViewerMediaImplList.begin(); impl_list::iterator end = sViewerMediaImplList.end(); // This should be quick, because there should be very few non-in-world-media impls @@ -3107,15 +3091,6 @@ bool LLViewerMediaImpl::isForcedUnloaded() const return true; } - if(sInWorldMediaDisabled) - { - // When inworld media is disabled, all instances that aren't marked as "used in UI" will not be loaded. - if(!mUsedInUI) - { - return true; - } - } - // If this media's class is not supposed to be shown, unload if (!shouldShowBasedOnClass()) { @@ -3783,12 +3758,22 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const // If it is attached to an avatar and the pref is off, we shouldn't show it if (attached_to_another_avatar) - return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING); - + { + static LLCachedControl show_media_on_others(gSavedSettings, LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING); + return show_media_on_others; + } if (inside_parcel) - return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING); + { + static LLCachedControl show_media_within_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING); + + return show_media_within_parcel; + } else - return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING); + { + static LLCachedControl show_media_outside_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING); + + return show_media_outside_parcel; + } } ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 15dcda59cf..fff5b3fc08 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -112,9 +112,6 @@ public: static F32 getVolume(); static void muteListChanged(); - static void setInWorldMediaDisabled(bool disabled); - static bool getInWorldMediaDisabled(); - static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest); // Returns the priority-sorted list of all media impls. -- cgit v1.2.3 From ed137f40d137dd78d0ec916ca91814cf5534a9f6 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 9 Feb 2012 11:40:55 -0800 Subject: fix for cached controls in media sorting --- indra/newview/llviewermedia.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index efc725896f..1eb4bedfaf 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3759,18 +3759,18 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const // If it is attached to an avatar and the pref is off, we shouldn't show it if (attached_to_another_avatar) { - static LLCachedControl show_media_on_others(gSavedSettings, LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING); + static LLCachedControl show_media_on_others(gSavedSettings, LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING); return show_media_on_others; } if (inside_parcel) { - static LLCachedControl show_media_within_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING); + static LLCachedControl show_media_within_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING); return show_media_within_parcel; } else { - static LLCachedControl show_media_outside_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING); + static LLCachedControl show_media_outside_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING); return show_media_outside_parcel; } -- cgit v1.2.3 From 4523b3137850df8922b12cc966633a3d5bb84374 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 9 Feb 2012 12:58:43 -0800 Subject: EXP-1844 FIX Selecting a large number of inventory items can block the viewer for a long time. only show hourglass and fetching text when downloading folders, not item metadata --- indra/newview/llfolderview.cpp | 4 +- indra/newview/llfolderviewitem.cpp | 2 +- indra/newview/llinventorybridge.cpp | 1 + indra/newview/llinventoryfilter.cpp | 2 +- indra/newview/llinventorymodelbackgroundfetch.cpp | 170 +++++++++++++--------- indra/newview/llinventorymodelbackgroundfetch.h | 4 +- indra/newview/llinventorypanel.cpp | 2 +- indra/newview/llpanelmaininventory.cpp | 2 +- indra/newview/llviewerinventory.cpp | 5 - 9 files changed, 108 insertions(+), 84 deletions(-) diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 2249f61435..86001e4146 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -912,7 +912,7 @@ void LLFolderView::draw() } else if (mShowEmptyMessage) { - if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) + if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) { mStatusText = LLTrans::getString("Searching"); } @@ -1966,7 +1966,7 @@ void LLFolderView::scrollToShowSelection() // However we allow scrolling for folder views with mAutoSelectOverride // (used in Places SP) as an exception because the selection in them // is not reset during items filtering. See STORM-133. - if ( (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() || mAutoSelectOverride) + if ( (!LLInventoryModelBackgroundFetch::instance().folderFetchActive() || mAutoSelectOverride) && mSelectedItems.size() ) { mNeedsScroll = TRUE; diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 734adbc648..afad27b4e0 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1045,7 +1045,7 @@ void LLFolderViewItem::draw() } if ((mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) - || (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() + || (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && root_is_loading && mShowLoadStatus)) { diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 257ceed912..daebfb5c86 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1324,6 +1324,7 @@ void LLItemBridge::selectItem() LLViewerInventoryItem* item = static_cast(getItem()); if(item && !item->isFinished()) { + //item->fetchFromServer(); LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false); } } diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 796251cae5..f818e33726 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -888,7 +888,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() + if (!LLInventoryModelBackgroundFetch::instance().folderFetchActive() && filtered_by_type && !filtered_by_all_types) { diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index cb140cf15c..f4d0110b0f 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -43,6 +43,7 @@ const S32 MAX_FETCH_RETRIES = 10; LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() : mBackgroundFetchActive(FALSE), + mFolderFetchActive(false), mAllFoldersFetched(FALSE), mRecursiveInventoryFetchStarted(FALSE), mRecursiveLibraryFetchStarted(FALSE), @@ -98,19 +99,20 @@ bool LLInventoryModelBackgroundFetch::isEverythingFetched() const return mAllFoldersFetched; } -BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() const +BOOL LLInventoryModelBackgroundFetch::folderFetchActive() const { - return mBackgroundFetchActive; + return mFolderFetchActive; } void LLInventoryModelBackgroundFetch::start(const LLUUID& id, BOOL recursive) { LLViewerInventoryCategory* cat = gInventory.getCategory(id); - if (cat || (id.isNull() && !mAllFoldersFetched)) + if (cat || (id.isNull() && !isEverythingFetched())) { // it's a folder, do a bulk fetch LL_DEBUGS("InventoryFetch") << "Start fetching category: " << id << ", recursive: " << recursive << LL_ENDL; mBackgroundFetchActive = TRUE; + mFolderFetchActive = true; if (id.isNull()) { if (!mRecursiveInventoryFetchStarted) @@ -159,21 +161,11 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& id, BOOL recursive) void LLInventoryModelBackgroundFetch::findLostItems() { mBackgroundFetchActive = TRUE; + mFolderFetchActive = true; mFetchQueue.push_back(FetchQueueInfo(LLUUID::null, TRUE)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } -void LLInventoryModelBackgroundFetch::stopBackgroundFetch() -{ - if (mBackgroundFetchActive) - { - mBackgroundFetchActive = FALSE; - gIdleCallbacks.deleteFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); - mFetchCount=0; - mMinTimeBetweenFetches=0.0f; - } -} - void LLInventoryModelBackgroundFetch::setAllFoldersFetched() { if (mRecursiveInventoryFetchStarted && @@ -181,7 +173,7 @@ void LLInventoryModelBackgroundFetch::setAllFoldersFetched() { mAllFoldersFetched = TRUE; } - stopBackgroundFetch(); + mFolderFetchActive = false; } void LLInventoryModelBackgroundFetch::backgroundFetchCB(void *) @@ -211,6 +203,9 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() llinfos << "Inventory fetch completed" << llendl; setAllFoldersFetched(); + mBackgroundFetchActive = false; + mFolderFetchActive = false; + return; } @@ -240,80 +235,114 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } const FetchQueueInfo info = mFetchQueue.front(); - LLViewerInventoryCategory* cat = gInventory.getCategory(info.mUUID); - // Category has been deleted, remove from queue. - if (!cat) + if (info.mIsCategory) { - mFetchQueue.pop_front(); - continue; - } + + LLViewerInventoryCategory* cat = gInventory.getCategory(info.mUUID); + + // Category has been deleted, remove from queue. + if (!cat) + { + mFetchQueue.pop_front(); + continue; + } - if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches && - LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) - { - // Category exists but has no children yet, fetch the descendants - // for now, just request every time and rely on retry timer to throttle. - if (cat->fetch()) + if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches && + LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) { - mFetchTimer.reset(); - mTimelyFetchPending = TRUE; + // Category exists but has no children yet, fetch the descendants + // for now, just request every time and rely on retry timer to throttle. + if (cat->fetch()) + { + mFetchTimer.reset(); + mTimelyFetchPending = TRUE; + } + else + { + // The catagory also tracks if it has expired and here it says it hasn't + // yet. Get out of here because nothing is going to happen until we + // update the timers. + break; + } } - else + // Do I have all my children? + else if (gInventory.isCategoryComplete(info.mUUID)) { - // The catagory also tracks if it has expired and here it says it hasn't - // yet. Get out of here because nothing is going to happen until we - // update the timers. + // Finished with this category, remove from queue. + mFetchQueue.pop_front(); + + // Add all children to queue. + LLInventoryModel::cat_array_t* categories; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); + for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); + it != categories->end(); + ++it) + { + mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive)); + } + + // We received a response in less than the fast time. + if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time) + { + // Shrink timeouts based on success. + mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f); + mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f); + lldebugs << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl; + } + + mTimelyFetchPending = FALSE; + continue; + } + else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) + { + // Received first packet, but our num descendants does not match db's num descendants + // so try again later. + mFetchQueue.pop_front(); + + if (mNumFetchRetries++ < MAX_FETCH_RETRIES) + { + // push on back of queue + mFetchQueue.push_back(info); + } + mTimelyFetchPending = FALSE; + mFetchTimer.reset(); break; } + + // Not enough time has elapsed to do a new fetch + break; } - // Do I have all my children? - else if (gInventory.isCategoryComplete(info.mUUID)) + else { - // Finished with this category, remove from queue. - mFetchQueue.pop_front(); + LLViewerInventoryItem* itemp = gInventory.getItem(info.mUUID); - // Add all children to queue. - LLInventoryModel::cat_array_t* categories; - LLInventoryModel::item_array_t* items; - gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); - for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); - it != categories->end(); - ++it) + mFetchQueue.pop_front(); + if (!itemp) { - mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive)); + continue; } - // We received a response in less than the fast time. - if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time) + if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches) { - // Shrink timeouts based on success. - mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f); - mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f); - lldebugs << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl; + itemp->fetchFromServer(); + mFetchTimer.reset(); + mTimelyFetchPending = TRUE; } - - mTimelyFetchPending = FALSE; - continue; - } - else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) - { - // Received first packet, but our num descendants does not match db's num descendants - // so try again later. - mFetchQueue.pop_front(); - - if (mNumFetchRetries++ < MAX_FETCH_RETRIES) + else if (itemp->mIsComplete) + { + mTimelyFetchPending = FALSE; + } + else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) { - // push on back of queue mFetchQueue.push_back(info); + mFetchTimer.reset(); + mTimelyFetchPending = FALSE; } - mTimelyFetchPending = FALSE; - mFetchTimer.reset(); + // Not enough time has elapsed to do a new fetch break; } - - // Not enough time has elapsed to do a new fetch - break; } // @@ -543,7 +572,6 @@ void LLInventoryModelBackgroundFetch::bulkFetch() //Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped. //If there are items in mFetchQueue, we want to check the time since the last bulkFetch was //sent. If it exceeds our retry time, go ahead and fire off another batch. - //Stopbackgroundfetch will be run from the Responder instead of here. LLViewerRegion* region = gAgent.getRegion(); if (!region) return; @@ -574,12 +602,12 @@ void LLInventoryModelBackgroundFetch::bulkFetch() LLSD item_request_body; LLSD item_request_body_lib; - while (!(mFetchQueue.empty()) && ((item_count + folder_count) < max_batch_size)) + while (!mFetchQueue.empty() + && (item_count + folder_count) < max_batch_size) { const FetchQueueInfo& fetch_info = mFetchQueue.front(); if (fetch_info.mIsCategory) { - const LLUUID &cat_id = fetch_info.mUUID; if (cat_id.isNull()) //DEV-17797 { diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index 0745407a8c..9dfedddd6d 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -48,7 +48,7 @@ public: // This gets triggered when performing a filter-search. void start(const LLUUID& cat_id = LLUUID::null, BOOL recursive = TRUE); - BOOL backgroundFetchActive() const; + BOOL folderFetchActive() const; bool isEverythingFetched() const; // completing the fetch once per session should be sufficient bool libraryFetchStarted() const; @@ -67,7 +67,6 @@ protected: void backgroundFetch(); static void backgroundFetchCB(void*); // background fetch idle function - void stopBackgroundFetch(); // stop fetch process void setAllFoldersFetched(); bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const; @@ -77,6 +76,7 @@ private: BOOL mAllFoldersFetched; BOOL mBackgroundFetchActive; + bool mFolderFetchActive; S16 mFetchCount; BOOL mTimelyFetchPending; S32 mNumFetchRetries; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 382569fa3a..01a8ecfb5d 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -817,7 +817,7 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask) if(handled) { ECursorType cursor = getWindow()->getCursor(); - if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && cursor == UI_CURSOR_ARROW) + if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && cursor == UI_CURSOR_ARROW) { // replace arrow cursor with arrow and hourglass cursor getWindow()->setCursor(UI_CURSOR_WORKING); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 374afb90be..c3c62920d3 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -567,7 +567,7 @@ void LLPanelMainInventory::updateItemcountText() std::string text = ""; - if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive()) + if (LLInventoryModelBackgroundFetch::instance().folderFetchActive()) { text = getString("ItemcountFetching", string_args); } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index cf52b5165b..45ca23cdfe 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -436,11 +436,6 @@ void LLViewerInventoryItem::fetchFromServer(void) const gAgent.sendReliableMessage(); } } - else - { - // *FIX: this can be removed after a bit. - llwarns << "request to fetch complete item" << llendl; - } } // virtual -- cgit v1.2.3 From ca80e17e90ce5b70feca76ddf41d3c25d01ac830 Mon Sep 17 00:00:00 2001 From: paulgproductengine Date: Thu, 9 Feb 2012 23:34:12 +0200 Subject: EXP-1822 FIXED (After deleting an item from inventory and confirming "ok" to delete, focus leaves inventory) - Return focus to the previously focused root view --- indra/newview/lltoastalertpanel.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index ada7570776..9ba8431fde 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -73,9 +73,14 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal // save currently focused view, so that return focus to it // on destroying this toast. LLView* current_selection = dynamic_cast(gFocusMgr.getKeyboardFocus()); - if (current_selection) + while(current_selection) { - mPreviouslyFocusedView = current_selection->getHandle(); + if (current_selection->isFocusRoot()) + { + mPreviouslyFocusedView = current_selection->getHandle(); + break; + } + current_selection = current_selection->getParent(); } const LLFontGL* font = LLFontGL::getFontSansSerif(); @@ -422,7 +427,7 @@ LLToastAlertPanel::~LLToastAlertPanel() // return focus to the previously focused view if (mPreviouslyFocusedView.get()) { - gFocusMgr.setKeyboardFocus(mPreviouslyFocusedView.get()); + mPreviouslyFocusedView.get()->setFocus(TRUE); } } -- cgit v1.2.3 From b3e56527a751aa2b87f50b33cf3439c07704c1d5 Mon Sep 17 00:00:00 2001 From: paulgproductengine Date: Thu, 9 Feb 2012 23:42:07 +0200 Subject: EXP-1546 FIXED (received items - purchasing some bodyparts and clothing from a prim marked for sale show wrong inventory icons) - In buy floater, for multiple WEARABLES inventory items show corresponding wearable icon --- indra/newview/llfloaterbuy.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index ee8487b160..087b0007e1 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -239,8 +239,9 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, // Compute icon for this item BOOL item_is_multi = FALSE; - if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED + if (( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS) + && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK)) { item_is_multi = TRUE; } -- cgit v1.2.3 From 21efa498a140bdc05c858cfa1be7e247d2b89278 Mon Sep 17 00:00:00 2001 From: paulgproductengine Date: Thu, 9 Feb 2012 23:47:00 +0200 Subject: EXP-1819 FIXED (Location & Favorites bar splitter should be draggable to 200 px on left and 150 px on right. ) - Allowed dragging to the left to shrink location to no less than 410 pixels, and to the right to shrink favorites to 185 pixels --- indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 53a09ce041..3edeb9aa36 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -70,7 +70,7 @@ layout="topleft" auto_resize="true" user_resize="true" - min_width="310" + min_width="410" name="navigation_layout_panel" width="480"> Date: Thu, 9 Feb 2012 23:54:22 +0200 Subject: EXP-1335 FIXED Disabled dragging the items from notecards and objects into Recent tab. Disabled DnD from Recent to Received Items. Fixed updating FILTERTYPE_DATE flag of LLInventoryFilter when time limits are applied. --- indra/newview/llinventoryfilter.cpp | 37 ++++++++++++---------- indra/newview/llinventoryfilter.h | 2 ++ .../skins/default/xui/en/panel_inbox_inventory.xml | 1 + 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 796251cae5..177ab28b36 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -282,19 +282,9 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) cons // Pass if this item is within the date range. if (filterTypes & FILTERTYPE_DATE) { - const U16 HOURS_TO_SECONDS = 3600; - time_t earliest = time_corrected() - mFilterOps.mHoursAgo * HOURS_TO_SECONDS; - if (mFilterOps.mMinDate > time_min() && mFilterOps.mMinDate < earliest) - { - earliest = mFilterOps.mMinDate; - } - else if (!mFilterOps.mHoursAgo) - { - earliest = 0; - } - if (item->getCreationDate() < earliest || - item->getCreationDate() > mFilterOps.mMaxDate) - return false; + // We don't get the updated item creation date for the task inventory or + // a notecard embedded item. See LLTaskInvFVBridge::getCreationDate(). + return false; } return true; @@ -548,7 +538,9 @@ void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date) mFilterOps.mMaxDate = llmax(mFilterOps.mMinDate, max_date); setModified(); } - mFilterOps.mFilterTypes |= FILTERTYPE_DATE; + + areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE + : mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE; } void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl) @@ -560,10 +552,12 @@ void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl) } if (!sl && isSinceLogoff()) { - setDateRange(0, time_max()); + setDateRange(time_min(), time_max()); setModified(); } - mFilterOps.mFilterTypes |= FILTERTYPE_DATE; + + areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE + : mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE; } BOOL LLInventoryFilter::isSinceLogoff() const @@ -608,7 +602,9 @@ void LLInventoryFilter::setHoursAgo(U32 hours) setModified(FILTER_RESTART); } } - mFilterOps.mFilterTypes |= FILTERTYPE_DATE; + + areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE + : mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE; } void LLInventoryFilter::setFilterLinks(U64 filter_links) @@ -1058,3 +1054,10 @@ const std::string& LLInventoryFilter::getEmptyLookupMessage() const return mEmptyLookupMessage; } + +bool LLInventoryFilter::areDateLimitsSet() +{ + return mFilterOps.mMinDate != time_min() + || mFilterOps.mMaxDate != time_max() + || mFilterOps.mHoursAgo != 0; +} diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 343306ae8e..8635d5d5b3 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -179,6 +179,8 @@ public: void fromLLSD(LLSD& data); private: + bool areDateLimitsSet(); + struct FilterOps { FilterOps(); diff --git a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml index 383e637ace..413e22e444 100644 --- a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml @@ -1,5 +1,6 @@ Date: Fri, 10 Feb 2012 02:33:22 +0200 Subject: EXP-1876 FIXED Landmark notes editor height increased to accommodate 5 lines of new font height. --- indra/newview/skins/default/xui/en/panel_landmark_info.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index d2088594dd..fd6e96b9a7 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -271,7 +271,7 @@ Date: Thu, 9 Feb 2012 17:14:37 -0800 Subject: EXP-1874 FIX Unexpected scrollbar in text notification --- indra/llui/lltextbase.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index e2d9a6cb81..35abe48510 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2380,6 +2380,8 @@ S32 LLTextBase::getEditableIndex(S32 index, bool increasing_direction) void LLTextBase::updateRects() { + mVisibleTextRect = getLocalRect(); + if (mLineInfoList.empty()) { mTextBoundingRect = LLRect(0, mVPad, mHPad, 0); @@ -2604,8 +2606,7 @@ BOOL LLTextSegment::handleScrollWheel(S32 x, S32 y, S32 clicks) { return FALSE; BOOL LLTextSegment::handleToolTip(S32 x, S32 y, MASK mask) { return FALSE; } const std::string& LLTextSegment::getName() const { - static std::string empty_string(""); - return empty_string; + return LLStringUtil::null; } void LLTextSegment::onMouseCaptureLost() {} void LLTextSegment::screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const {} -- cgit v1.2.3 From e9ee15d9420d8987028ec0267ac5d1f46a918b6f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 9 Feb 2012 17:45:30 -0800 Subject: EXP-1877 FIX Scroll list listings in group roles tab and other areas shows vertical scroll bar before needed --- indra/newview/skins/default/xui/en/floater_about_land.xml | 4 ++-- indra/newview/skins/default/xui/en/floater_choose_group.xml | 2 +- indra/newview/skins/default/xui/en/panel_group_roles.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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 2781717f0b..a737c123c6 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -2085,7 +2085,7 @@ Only large parcels can be listed in search. column_padding="0" follows="top|bottom" heading_height="14" - height="120" + height="125" layout="topleft" left="0" multi_select="true" @@ -2134,7 +2134,7 @@ Only large parcels can be listed in search. column_padding="0" follows="top|bottom" heading_height="14" - height="120" + height="125" layout="topleft" left="0" multi_select="true" diff --git a/indra/newview/skins/default/xui/en/floater_choose_group.xml b/indra/newview/skins/default/xui/en/floater_choose_group.xml index dc1ee5f24e..2cf6e682fd 100644 --- a/indra/newview/skins/default/xui/en/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/en/floater_choose_group.xml @@ -20,7 +20,7 @@ Choose a group: Date: Thu, 9 Feb 2012 17:50:09 -0800 Subject: EXP-1883 FIX Toolbar button tooltips display off screen for right hand tool bar, bottom tool bar, and tooltips on top bar items show off screen --- indra/llui/llmenugl.cpp | 2 +- indra/llui/llui.cpp | 2 +- indra/llui/llview.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 1284231e52..ff6928ffda 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3082,7 +3082,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) mouse_y + MOUSE_CURSOR_PADDING, CURSOR_WIDTH + MOUSE_CURSOR_PADDING * 2, CURSOR_HEIGHT + MOUSE_CURSOR_PADDING * 2); - menu->translateIntoRectWithExclusion( menu_region_rect, mouse_rect, FALSE ); + menu->translateIntoRectWithExclusion( menu_region_rect, mouse_rect ); menu->getParent()->sendChildToFront(menu); } diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 137716743f..31ccec0d2a 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -2049,7 +2049,7 @@ void LLUI::positionViewNearMouse(LLView* view, S32 spawn_x, S32 spawn_y) // Start at spawn position (using left/top) view->setOrigin( local_x, local_y - view->getRect().getHeight()); // Make sure we're on-screen and not overlapping the mouse - view->translateIntoRectWithExclusion( virtual_window_rect, mouse_rect, FALSE ); + view->translateIntoRectWithExclusion( virtual_window_rect, mouse_rect ); } LLView* LLUI::resolvePath(LLView* context, const std::string& path) diff --git a/indra/llui/llview.h b/indra/llui/llview.h index de2fab963b..fd19309a56 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -371,7 +371,7 @@ public: virtual void translate( S32 x, S32 y ); void setOrigin( S32 x, S32 y ) { mRect.translate( x - mRect.mLeft, y - mRect.mBottom ); } BOOL translateIntoRect( const LLRect& constraint, S32 min_overlap_pixels = S32_MAX); - BOOL translateIntoRectWithExclusion( const LLRect& inside, const LLRect& exclude, BOOL allow_partial_outside ); + BOOL translateIntoRectWithExclusion( const LLRect& inside, const LLRect& exclude, S32 min_overlap_pixels = S32_MAX); void centerWithin(const LLRect& bounds); void setShape(const LLRect& new_rect, bool by_user = false); -- cgit v1.2.3 From 5d276be881593b9e2c247edf8e6361447e964d52 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 10 Feb 2012 20:36:53 +0200 Subject: EXP-1885 FIXED the crash when receiving multiple inventory offer notifications. Fixed erasing the iterator which was becoming invalid on recursive calls. --- indra/newview/llscreenchannel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 1045009a04..a0f146e506 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -327,8 +327,8 @@ void LLScreenChannel::onToastFade(LLToast* toast) bool delete_toast = !mCanStoreToasts || !toast->getCanBeStored(); if(delete_toast) { - deleteToast(toast); mToastList.erase(it); + deleteToast(toast); } else { -- cgit v1.2.3 From e0f86bfb2d85c8dd3c84b6a56fa42aae431f6fe3 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 10 Feb 2012 16:41:24 -0500 Subject: STORM-1793 Supply missing new artwork --- .../skins/default/textures/map_avatar_unknown_32.tga | Bin 0 -> 4140 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 indra/newview/skins/default/textures/map_avatar_unknown_32.tga diff --git a/indra/newview/skins/default/textures/map_avatar_unknown_32.tga b/indra/newview/skins/default/textures/map_avatar_unknown_32.tga new file mode 100644 index 0000000000..d1192478c6 Binary files /dev/null and b/indra/newview/skins/default/textures/map_avatar_unknown_32.tga differ -- cgit v1.2.3 From 6a6cf3aa78b328c5a4cb78ad1b4f9f2fb831c8e4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 10 Feb 2012 16:35:22 -0800 Subject: EXP-1884 FIX Errors in navigating text when editing Landmarks and picks once a vertical scrollbar is shown --- indra/llui/lltextbase.cpp | 10 +++++----- indra/llui/llview.cpp | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 35abe48510..15c2d4946c 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1192,7 +1192,7 @@ void LLTextBase::reflow() // shrink document to minimum size (visible portion of text widget) // to force inlined widgets with follows set to shrink - mDocumentView->reshape(mVisibleTextRect.getWidth(), mDocumentView->getRect().getHeight()); + //mDocumentView->reshape(mVisibleTextRect.getWidth(), mDocumentView->getRect().getHeight()); S32 cur_top = 0; @@ -2380,7 +2380,8 @@ S32 LLTextBase::getEditableIndex(S32 index, bool increasing_direction) void LLTextBase::updateRects() { - mVisibleTextRect = getLocalRect(); + LLRect old_text_rect = mVisibleTextRect; + mVisibleTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect(); if (mLineInfoList.empty()) { @@ -2403,10 +2404,10 @@ void LLTextBase::updateRects() switch(mVAlign) { case LLFontGL::TOP: - delta_pos = llmax(mVisibleTextRect.mTop - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom); + delta_pos = llmax(mVisibleTextRect.getHeight() - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom); break; case LLFontGL::VCENTER: - delta_pos = (llmax(mVisibleTextRect.mTop - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom) + (mVisibleTextRect.mBottom - mTextBoundingRect.mBottom)) / 2; + delta_pos = (llmax(mVisibleTextRect.getHeight() - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom) + (mVisibleTextRect.mBottom - mTextBoundingRect.mBottom)) / 2; break; case LLFontGL::BOTTOM: delta_pos = mVisibleTextRect.mBottom - mTextBoundingRect.mBottom; @@ -2459,7 +2460,6 @@ void LLTextBase::updateRects() //update mVisibleTextRect *after* mDocumentView has been resized // so that scrollbars are added if document needs to scroll // since mVisibleTextRect does not include scrollbars - LLRect old_text_rect = mVisibleTextRect; mVisibleTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect(); //FIXME: replace border with image? if (mBorderVisible) diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index d22e14745f..421166dcd4 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1300,7 +1300,10 @@ void LLView::reshape(S32 width, S32 height, BOOL called_from_parent) S32 delta_x = child_rect.mLeft - viewp->getRect().mLeft; S32 delta_y = child_rect.mBottom - viewp->getRect().mBottom; viewp->translate( delta_x, delta_y ); - viewp->reshape(child_rect.getWidth(), child_rect.getHeight()); + if (child_rect.getWidth() != viewp->getRect().getWidth() || child_rect.getHeight() != viewp->getRect().getHeight()) + { + viewp->reshape(child_rect.getWidth(), child_rect.getHeight()); + } } } -- cgit v1.2.3 From 51a8134f62ff0705ede2534945e808ccbd9d6b7e Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 10 Feb 2012 20:09:48 -0800 Subject: EXP-1885 FIX Viewer crashes when receiving multiple inventory offer notifications --- indra/newview/llscreenchannel.cpp | 10 +++++++++- indra/newview/lltoast.cpp | 13 ++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index a0f146e506..d340b304ca 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -798,6 +798,7 @@ void LLScreenChannel::showToastsTop() } // Dismiss toasts we don't have space for (STORM-391). + std::vector toasts_to_hide; if(it != mToastList.rend()) { mHiddenToastsNum = 0; @@ -806,10 +807,17 @@ void LLScreenChannel::showToastsTop() LLToast* toast = it->getToast(); if (toast) { - toast->hide(); + toasts_to_hide.push_back(toast); } } } + + for (std::vector::iterator it = toasts_to_hide.begin(), end_it = toasts_to_hide.end(); + it != end_it; + ++it) + { + (*it)->hide(); + } } //-------------------------------------------------------------------------- diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index cdc611f7af..0eec7f0afd 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -180,11 +180,14 @@ LLToast::~LLToast() //-------------------------------------------------------------------------- void LLToast::hide() { - setVisible(FALSE); - setFading(false); - mTimer->stop(); - mIsHidden = true; - mOnFadeSignal(this); + if (!mIsHidden) + { + setVisible(FALSE); + setFading(false); + mTimer->stop(); + mIsHidden = true; + mOnFadeSignal(this); + } } void LLToast::onFocusLost() -- cgit v1.2.3 From 11c53b444d77788044fe0e164fde4364b8206564 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 15 Feb 2012 18:12:26 -0800 Subject: EXP-1884 FIX Errors in navigating text when editing Landmarks and picks once a vertical scrollbar is shown fixed horizontal scrollbar showing up in local chat --- indra/llui/lltextbase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 15c2d4946c..7aeeae298f 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1192,7 +1192,10 @@ void LLTextBase::reflow() // shrink document to minimum size (visible portion of text widget) // to force inlined widgets with follows set to shrink - //mDocumentView->reshape(mVisibleTextRect.getWidth(), mDocumentView->getRect().getHeight()); + if (mWordWrap) + { + mDocumentView->reshape(mVisibleTextRect.getWidth(), mDocumentView->getRect().getHeight()); + } S32 cur_top = 0; -- cgit v1.2.3 From 092c0eda65eedd606ae7cbacd74445dcff496998 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 18 Feb 2012 08:22:59 -0500 Subject: STORM-1807 Fix possible Linux compiling issue --- indra/newview/llpreviewanim.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index dcb8bca512..35ac0537a3 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -103,8 +103,14 @@ void LLPreviewAnim::play(const LLSD& param) if (getChild(btn_name)->getValue().asBoolean() ) { - "Inworld" == btn_name ? gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START) : - gAgentAvatarp->startMotion(item->getAssetUUID()); + if("Inworld" == btn_name) + { + gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START); + } + else + { + gAgentAvatarp->startMotion(item->getAssetUUID()); + } LLMotion* motion = gAgentAvatarp->findMotion(itemID); if (motion) -- cgit v1.2.3 From 566bbe7e09bf9cd9939cfae40773d86993803d1b Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sun, 19 Feb 2012 14:06:32 -0500 Subject: STORM-1808 Recode so build button is not clickable when grayed out --- indra/newview/app_settings/commands.xml | 4 ++-- indra/newview/llagent.cpp | 6 +----- indra/newview/lltoolmgr.cpp | 11 +++++++++-- indra/newview/lltoolmgr.h | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 16a7e0b314..12ce45717b 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -37,10 +37,10 @@ tooltip_ref="Command_Build_Tooltip" execute_function="Build.Toggle" execute_parameters="build" - is_enabled_function="Agent.IsActionAllowed" + is_enabled_function="Build.Enabled" is_enabled_parameters="build" is_running_function="Floater.IsOpen" - is_running_parameters="build" + is_running_parameters="toolbox floater" /> allowAgentBuild(); - } - else if (param == "speak") + if (param == "speak") { if ( gAgent.isVoiceConnected() && LLViewerParcelMgr::getInstance()->allowAgentVoice() && diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index 6bc7c6de11..ac01316462 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -81,7 +81,7 @@ LLToolMgr::LLToolMgr() // Not a panel, register these callbacks globally. LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this)); - LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this)); + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this, _2)); gToolNull = new LLTool(LLStringUtil::null); // Does nothing setCurrentTool(gToolNull); @@ -245,8 +245,15 @@ bool LLToolMgr::canEdit() return LLViewerParcelMgr::getInstance()->allowAgentBuild(); } -void LLToolMgr::toggleBuildMode() +void LLToolMgr::toggleBuildMode(const LLSD& sdname) { + const std::string& param = sdname.asString(); + + if (param == "build" && !canEdit()) + { + return; + } + LLFloaterReg::toggleInstanceOrBringToFront("build"); bool build_visible = LLFloaterReg::instanceVisible("build"); diff --git a/indra/newview/lltoolmgr.h b/indra/newview/lltoolmgr.h index d489c4c829..12649cfba2 100644 --- a/indra/newview/lltoolmgr.h +++ b/indra/newview/lltoolmgr.h @@ -54,7 +54,7 @@ public: bool inEdit(); bool canEdit(); - void toggleBuildMode(); + void toggleBuildMode(const LLSD& sdname); /* Determines if we are in Build mode or not. */ bool inBuildMode(); -- cgit v1.2.3 From 065edd19d60737ee330b0f64defb301995fdb5fd Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sun, 19 Feb 2012 16:20:47 -0500 Subject: STORM-1808 Fix wrong name in xml file --- indra/newview/app_settings/commands.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 12ce45717b..73df064ab2 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -40,7 +40,7 @@ is_enabled_function="Build.Enabled" is_enabled_parameters="build" is_running_function="Floater.IsOpen" - is_running_parameters="toolbox floater" + is_running_parameters="build" /> Date: Wed, 22 Feb 2012 22:33:57 +0200 Subject: EXP-1335 FIXED Dragging folders into Recent Items disabled. - Dragging folder into Recent Items disabled, but allowed within Recent Items. - Dragging Contents folder from task inventory disabled. - Filtering folder contents upon dragging to any inventory panel added, to make the behavior consistent with items filtering during DnD. --- indra/newview/llinventorybridge.cpp | 145 +++++++++++++++++++++++++++++++++--- indra/newview/llinventorybridge.h | 4 +- indra/newview/llinventoryfilter.cpp | 27 ++++++- indra/newview/llinventoryfilter.h | 3 +- 4 files changed, 161 insertions(+), 18 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index daebfb5c86..416261780e 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -113,6 +113,13 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response bool confirm_attachment_rez(const LLSD& notification, const LLSD& response); void teleport_via_landmark(const LLUUID& asset_id); static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit); +static bool check_category(LLInventoryModel* model, + const LLUUID& cat_id, + LLFolderView* active_folder_view, + LLInventoryFilter* filter); +static bool check_item(const LLUUID& item_id, + LLFolderView* active_folder_view, + LLInventoryFilter* filter); // Helper functions @@ -1959,6 +1966,12 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (!isAgentAvatarValid()) return FALSE; if (!isAgentInventory()) return FALSE; // cannot drag categories into library + LLInventoryPanel* destination_panel = mInventoryPanel.get(); + if (!destination_panel) return false; + + LLInventoryFilter* filter = destination_panel->getFilter(); + if (!filter) return false; + const LLUUID &cat_id = inv_cat->getUUID(); const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); @@ -2146,6 +2159,39 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } + if (is_movable) + { + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + is_movable = active_panel != NULL; + + // For a folder to pass the filter all its descendants are required to pass. + // We make this exception to allow reordering folders within an inventory panel, + // which has a filter applied, like Recent tab for example. + // There may be folders which are displayed because some of their descendants pass + // the filter, but other don't, and thus remain hidden. Without this check, + // such folders would not be allowed to be moved within a panel. + if (destination_panel == active_panel) + { + is_movable = true; + } + else + { + LLFolderView* active_folder_view; + + if (is_movable) + { + active_folder_view = active_panel->getRootFolder(); + is_movable = active_folder_view != NULL; + } + + if (is_movable) + { + // Check whether the folder being dragged from active inventory panel + // passes the filter of the destination panel. + is_movable = check_category(model, cat_id, active_folder_view, filter); + } + } + } // //-------------------------------------------------------------------------------- @@ -2240,7 +2286,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else { - accept = move_inv_category_world_to_agent(cat_id, mUUID, drop); + accept = move_inv_category_world_to_agent(cat_id, mUUID, drop, NULL, NULL, filter); } } else if (LLToolDragAndDrop::SOURCE_LIBRARY == source) @@ -2285,7 +2331,8 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, const LLUUID& category_id, BOOL drop, void (*callback)(S32, void*), - void* user_data) + void* user_data, + LLInventoryFilter* filter) { // Make sure the object exists. If we allowed dragging from // anonymous objects, it would be possible to bypass @@ -2309,7 +2356,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, return FALSE; } - BOOL accept = TRUE; + BOOL accept = FALSE; BOOL is_move = FALSE; // coming from a task. Need to figure out if the person can @@ -2318,9 +2365,16 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, LLInventoryObject::object_list_t::iterator end = inventory_objects.end(); for ( ; it != end; ++it) { + LLInventoryItem* item = dynamic_cast(it->get()); + if (!item) + { + llwarns << "Invalid inventory item for drop" << llendl; + continue; + } + // coming from a task. Need to figure out if the person can // move/copy this item. - LLPermissions perm(((LLInventoryItem*)((LLInventoryObject*)(*it)))->getPermissions()); + LLPermissions perm(item->getPermissions()); if((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) && perm.allowTransferTo(gAgent.getID()))) // || gAgent.isGodlike()) @@ -2335,9 +2389,14 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, is_move = TRUE; accept = TRUE; } - else + + if (filter && accept) + { + accept = filter->check(item); + } + + if (!accept) { - accept = FALSE; break; } } @@ -3693,10 +3752,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // passes the filter of the destination panel. if (accept && active_panel) { - LLFolderView* active_folder_viev = active_panel->getRootFolder(); - if (!active_folder_viev) return false; + LLFolderView* active_folder_view = active_panel->getRootFolder(); + if (!active_folder_view) return false; - LLFolderViewItem* fv_item = active_folder_viev->getItemByID(inv_item->getUUID()); + LLFolderViewItem* fv_item = active_folder_view->getItemByID(inv_item->getUUID()); if (!fv_item) return false; accept = filter->check(fv_item); @@ -3916,10 +3975,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // passes the filter of the destination panel. if (accept && active_panel) { - LLFolderView* active_folder_viev = active_panel->getRootFolder(); - if (!active_folder_viev) return false; + LLFolderView* active_folder_view = active_panel->getRootFolder(); + if (!active_folder_view) return false; - LLFolderViewItem* fv_item = active_folder_viev->getItemByID(inv_item->getUUID()); + LLFolderViewItem* fv_item = active_folder_view->getItemByID(inv_item->getUUID()); if (!fv_item) return false; accept = filter->check(fv_item); @@ -3959,6 +4018,68 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, return accept; } +// static +bool check_category(LLInventoryModel* model, + const LLUUID& cat_id, + LLFolderView* active_folder_view, + LLInventoryFilter* filter) +{ + if (!model || !active_folder_view || !filter) + return false; + + if (!filter->checkFolder(cat_id)) + { + return false; + } + + LLInventoryModel::cat_array_t descendent_categories; + LLInventoryModel::item_array_t descendent_items; + model->collectDescendents(cat_id, descendent_categories, descendent_items, TRUE); + + S32 num_descendent_categories = descendent_categories.count(); + S32 num_descendent_items = descendent_items.count(); + + if (num_descendent_categories + num_descendent_items == 0 + && filter->getShowFolderState() != LLInventoryFilter::SHOW_ALL_FOLDERS) + { + // Empty folders are not allowed if we are not showing all folders + return false; + } + + for (S32 i = 0; i < num_descendent_categories; ++i) + { + LLInventoryCategory* category = descendent_categories[i]; + if(!check_category(model, category->getUUID(), active_folder_view, filter)) + { + return false; + } + } + + for (S32 i = 0; i < num_descendent_items; ++i) + { + LLViewerInventoryItem* item = descendent_items[i]; + if(!check_item(item->getUUID(), active_folder_view, filter)) + { + return false; + } + } + + return true; +} + +// static +bool check_item(const LLUUID& item_id, + LLFolderView* active_folder_view, + LLInventoryFilter* filter) +{ + if (!active_folder_view || !filter) return false; + + LLFolderViewItem* fv_item = active_folder_view->getItemByID(item_id); + if (!fv_item) return false; + + return filter->check(fv_item); +} + // +=================================================+ // | LLTextureBridge | // +=================================================+ diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 3bcd71557c..3b4f845f54 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -35,6 +35,7 @@ #include "llviewercontrol.h" #include "llwearable.h" +class LLInventoryFilter; class LLInventoryPanel; class LLInventoryModel; class LLMenuGL; @@ -645,7 +646,8 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, const LLUUID& category_id, BOOL drop, void (*callback)(S32, void*) = NULL, - void* user_data = NULL); + void* user_data = NULL, + LLInventoryFilter* filter = NULL); // Utility function to hide all entries except those in the list // Can be called multiple times on the same menu (e.g. if multiple items diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 4971ded634..5496c273f2 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -121,16 +121,35 @@ bool LLInventoryFilter::check(const LLInventoryItem* item) return passed; } -bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder) +bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder) const { - // we're showing all folders, overriding filter - if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS) + if (!folder) { - return true; + llwarns << "The filter can not be checked on an invalid folder." << llendl; + llassert(false); // crash in development builds + return false; } const LLFolderViewEventListener* listener = folder->getListener(); + if (!listener) + { + llwarns << "Folder view event listener not found." << llendl; + llassert(false); // crash in development builds + return false; + } + const LLUUID folder_id = listener->getUUID(); + + return checkFolder(folder_id); +} + +bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const +{ + // we're showing all folders, overriding filter + if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS) + { + return true; + } if (mFilterOps.mFilterTypes & FILTERTYPE_CATEGORY) { diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 8635d5d5b3..6be2acfaa3 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -117,7 +117,8 @@ public: // +-------------------------------------------------------------------+ BOOL check(const LLFolderViewItem* item); bool check(const LLInventoryItem* item); - bool checkFolder(const LLFolderViewFolder* folder); + bool checkFolder(const LLFolderViewFolder* folder) const; + bool checkFolder(const LLUUID& folder_id) const; BOOL checkAgainstFilterType(const LLFolderViewItem* item) const; bool checkAgainstFilterType(const LLInventoryItem* item) const; BOOL checkAgainstPermissions(const LLFolderViewItem* item) const; -- cgit v1.2.3 From d5d2147a97953434f2baddf9d3f7c9d1be7f7b3e Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 22 Feb 2012 23:11:29 +0200 Subject: Windows build fix. --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 416261780e..dcdc1391eb 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2176,7 +2176,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else { - LLFolderView* active_folder_view; + LLFolderView* active_folder_view = NULL; if (is_movable) { -- cgit v1.2.3 From 11d29660aa84a1a8a61e427698715497a57243c2 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 23 Feb 2012 21:47:03 +0200 Subject: EXP-1335 FIXED empty folders not draggable between Inventory windows. Added filtering empty folders as any other folder view item. This enables dragging empty folders between Inventory floaters when they pass the filter. --- indra/newview/llinventorybridge.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index dcdc1391eb..6a20120808 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4039,11 +4039,12 @@ bool check_category(LLInventoryModel* model, S32 num_descendent_categories = descendent_categories.count(); S32 num_descendent_items = descendent_items.count(); - if (num_descendent_categories + num_descendent_items == 0 - && filter->getShowFolderState() != LLInventoryFilter::SHOW_ALL_FOLDERS) + if (num_descendent_categories + num_descendent_items == 0) { - // Empty folders are not allowed if we are not showing all folders - return false; + // Empty folder should be checked as any other folder view item. + // If we are filtering by date the folder should not pass because + // it doesn't have its own creation date. See LLInvFVBridge::getCreationDate(). + return check_item(cat_id, active_folder_view, filter); } for (S32 i = 0; i < num_descendent_categories; ++i) -- cgit v1.2.3 From 1b624f5ea686292652978c72d39e5546efe23d0f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 24 Feb 2012 11:43:44 -0800 Subject: potential fix for linux build --- indra/llui/llfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 3afa1b8e3a..22b20969fc 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -3275,7 +3275,7 @@ void LLFloater::stackWith(LLFloater& other) } LLCoordFloater::LLCoordFloater(F32 x, F32 y, LLFloater& floater) -: coord_t(x, y) +: coord_t((S32)x, (S32)y) { mFloater = floater.getHandle(); } -- cgit v1.2.3 From bc7771a415ee6d8e10b529a3ea535b00d5666b75 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 29 Feb 2012 15:08:06 -0800 Subject: Added tag 3.3.0-start for changeset d5f263687f43 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5b9726b47c..e994e188e7 100644 --- a/.hgtags +++ b/.hgtags @@ -269,3 +269,4 @@ e9c82fca5ae6fb8a8af29012d78fb194a29323f3 3.2.9-beta1 a01ef9bed28627f4ca543fbc1d70c79cc297a90f DRTVWR-118_3.2.9-beta2 a01ef9bed28627f4ca543fbc1d70c79cc297a90f 3.2.9-beta2 987425b1acf4752379b2e1eb20944b4b35d67a85 3.2.8-beta2 +d5f263687f43f278107363365938f0a214920a4b 3.3.0-start -- cgit v1.2.3 From ca36a06d2e994178cecfae249f7f1cc3af3554a0 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 29 Feb 2012 15:08:57 -0800 Subject: increment viewer version to 3.3.1 --- indra/llcommon/llversionviewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index a869c74189..26ff1b5c55 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -29,7 +29,7 @@ const S32 LL_VERSION_MAJOR = 3; const S32 LL_VERSION_MINOR = 3; -const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_PATCH = 1; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; -- cgit v1.2.3 From a0fda9b816a65761b2521ab48e4b926d2e4b2165 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 7 Mar 2012 14:17:09 -0500 Subject: first test using viewer-beta-candidate tag --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e994e188e7..e268067b8d 100644 --- a/.hgtags +++ b/.hgtags @@ -270,3 +270,4 @@ a01ef9bed28627f4ca543fbc1d70c79cc297a90f DRTVWR-118_3.2.9-beta2 a01ef9bed28627f4ca543fbc1d70c79cc297a90f 3.2.9-beta2 987425b1acf4752379b2e1eb20944b4b35d67a85 3.2.8-beta2 d5f263687f43f278107363365938f0a214920a4b 3.3.0-start +dffd0457ee0745de65bf95f0642a5c9e46b8e2f0 viewer-beta-candidate -- cgit v1.2.3 From f712614d7bfb132cf0d4bc5ff5e2e02ea73a9bda Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 8 Mar 2012 21:07:59 -0500 Subject: update build params for viewer release management builds --- BuildParams | 45 +++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/BuildParams b/BuildParams index c051397853..1c39dd7cc7 100644 --- a/BuildParams +++ b/BuildParams @@ -36,50 +36,25 @@ viewer-development.build_debug_release_separately = true # _.email = # ================================================================= -# Viewer Development (snowstorm canonical build owned by Oz Linden) +# Canonical viewer integration builds - Oz Linden # ================================================================= -snowstorm_viewer-development.viewer_channel = "Second Life Development" -snowstorm_viewer-development.login_channel = "Second Life Development" -snowstorm_viewer-development.build_viewer_update_version_manager = false -snowstorm_viewer-development.email = viewer-development-builds@lists.secondlife.com -snowstorm_viewer-development.build_enforce_coding_policy = true -snowstorm_viewer-development.codeticket_add_context = true +integration_viewer-development.viewer_channel = "Second Life Development" +integration_viewer-development.login_channel = "Second Life Development" +integration_viewer-development.build_viewer_update_version_manager = false +integration_viewer-development.email = viewer-development-builds@lists.secondlife.com +integration_viewer-development.build_enforce_coding_policy = true +integration_viewer-development.codeticket_add_context = true -Snowstorm_viewer-project-review.build_debug_release_separately = true -Snowstorm_viewer-project-review.codeticket_add_context = true -Snowstorm_viewer-project-review.viewer_channel = "Project Viewer - Snowstorm Team" -Snowstorm_viewer-project-review.login_channel = "Project Viewer - Snowstorm Team" -Snowstorm_viewer-project-review.codeticket_add_context = true - -# ======================================== -# Viewer Beta (Owner: Dessie Linden) -# ======================================== viewer-beta.viewer_channel = "Second Life Beta Viewer" viewer-beta.login_channel = "Second Life Beta Viewer" viewer-beta.build_debug_release_separately = true viewer-beta.build_viewer_update_version_manager = true -viewer-pre-beta.viewer_channel = "Second Life Beta Viewer" -viewer-pre-beta.login_channel = "Second Life Beta Viewer" -viewer-pre-beta.build_debug_release_separately = true -viewer-pre-beta.build_viewer_update_version_manager = true - - -# ======================================== -# Viewer Release (Owner: Dessie Linden) -# ======================================== viewer-release.viewer_channel = "Second Life Release" viewer-release.login_channel = "Second Life Release" viewer-release.build_debug_release_separately = true viewer-release.build_viewer_update_version_manager = true -viewer-pre-release.viewer_channel = "Second Life Release" -viewer-pre-release.login_channel = "Second Life Release" -viewer-pre-release.build_debug_release_separately = true -viewer-pre-release.build_viewer_update_version_manager = true -#viewer-pre-release.release-viewer.jira = DRTVWR-92 - - # ======================================== # mesh-development # ======================================== @@ -140,6 +115,12 @@ viewer-mesh.email = shining@lists.lindenlab.com # oz # ================ +Snowstorm_viewer-project-review.build_debug_release_separately = true +Snowstorm_viewer-project-review.codeticket_add_context = true +Snowstorm_viewer-project-review.viewer_channel = "Project Viewer - Snowstorm Team" +Snowstorm_viewer-project-review.login_channel = "Project Viewer - Snowstorm Team" +Snowstorm_viewer-project-review.codeticket_add_context = true + oz_viewer-devreview.build_debug_release_separately = true oz_viewer-devreview.codeticket_add_context = false oz_viewer-devreview.build_enforce_coding_policy = true -- cgit v1.2.3 From 877160479bc706310c2839849cff57961ebd4709 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 21 Mar 2012 20:02:19 -0400 Subject: Added tag viewer-beta-candidate for changeset 3e2fca4ed1a0 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index c6e3a150eb..261b3ef140 100644 --- a/.hgtags +++ b/.hgtags @@ -277,3 +277,5 @@ d5f263687f43f278107363365938f0a214920a4b DRTVWR-119 d5f263687f43f278107363365938f0a214920a4b 3.3.0-beta1 5e8d2662f38a66eca6c591295f5880d47afc73f7 viewer-release-candidate 5e8d2662f38a66eca6c591295f5880d47afc73f7 3.3.0-release +dffd0457ee0745de65bf95f0642a5c9e46b8e2f0 viewer-beta-candidate +3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 viewer-beta-candidate -- cgit v1.2.3 From 38ad8611c988e6ca0caae95d397e3ce67f1ceb36 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 27 Mar 2012 10:55:15 -0400 Subject: MAINT-710: Fix for VertexBufferStrider could not find valid vertex data. (from Firestorm) --- indra/newview/llface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index cd33a19a2a..cfb4147e71 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1838,7 +1838,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } } - if (rebuild_color) + if (rebuild_color && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_COLOR) ) { LLFastTimer t(FTM_FACE_GEOM_COLOR); mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount, map_range); -- cgit v1.2.3 From a5ef634b06a87f3738e14f5a375e19c0c5ac38f3 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 30 Mar 2012 15:45:54 +0300 Subject: MAINT-813 FIXED Potential fix for a crash at LLViewerRegion::getPosGlobalFromRegion. As far as I can tell, if login fails with the "Region has begun the logout process" message, gAgentAvatarp gets destroyed, which leads to the crash. Adding a check that should prevent it (could not reproduce to make sure). --- indra/newview/llviewerobject.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 37fb77a10a..e590f29a9a 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -143,7 +143,10 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco } else { - gAgentAvatarp->updateRegion(regionp); + if (isAgentAvatarValid()) + { + gAgentAvatarp->updateRegion(regionp); + } } res = gAgentAvatarp; } -- cgit v1.2.3 From 7ef7bbef65d8622668bc8a007766f25a70386d27 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 12 Apr 2012 23:09:32 +0300 Subject: MAINT-891 FIXED Disabled focus return from modal dialog after viewer logoff. Fixed boost trackable objects usage. --- indra/newview/llchiclet.cpp | 14 +++++++------- indra/newview/llchiclet.h | 4 ++++ indra/newview/llimview.h | 5 ++--- indra/newview/lltoastalertpanel.cpp | 4 ++-- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index aabab0ccb9..a661808d1f 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1113,8 +1113,8 @@ LLChicletPanel::~LLChicletPanel() } } -void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ - +void LLChicletPanel::onMessageCountChanged(const LLSD& data) +{ LLUUID session_id = data["session_id"].asUUID(); S32 unread = data["participant_unread"].asInteger(); @@ -1139,7 +1139,7 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ } } -void object_chiclet_callback(const LLSD& data) +void LLChicletPanel::objectChicletCallback(const LLSD& data) { LLUUID notification_id = data["notification_id"]; bool new_message = data["new_message"]; @@ -1163,10 +1163,10 @@ void object_chiclet_callback(const LLSD& data) BOOL LLChicletPanel::postBuild() { LLPanel::postBuild(); - LLIMModel::instance().addNewMsgCallback(boost::bind(im_chiclet_callback, this, _1)); - LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(im_chiclet_callback, this, _1)); - LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(object_chiclet_callback, _1)); - LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(object_chiclet_callback, _1)); + LLIMModel::instance().addNewMsgCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1)); + LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1)); + LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(&LLChicletPanel::objectChicletCallback, this, _1)); + LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(&LLChicletPanel::objectChicletCallback, this, _1)); LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLChicletPanel::findChiclet, this, _1)); LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLChicletPanel::onCurrentVoiceChannelChanged, this, _1)); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 1f1069dcb4..19683492c2 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -1158,6 +1158,10 @@ protected: */ void onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param); + void onMessageCountChanged(const LLSD& data); + + void objectChicletCallback(const LLSD& data); + typedef std::vector chiclet_list_t; /** diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index f07a78e2f7..7c2cd03d97 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -153,7 +153,6 @@ public: std::map mId2SessionMap; typedef boost::signals2::signal session_signal_t; - typedef boost::function session_callback_t; session_signal_t mNewMsgSignal; session_signal_t mNoUnreadMsgsSignal; @@ -174,8 +173,8 @@ public: */ void processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id); - boost::signals2::connection addNewMsgCallback( session_callback_t cb ) { return mNewMsgSignal.connect(cb); } - boost::signals2::connection addNoUnreadMsgsCallback( session_callback_t cb ) { return mNoUnreadMsgsSignal.connect(cb); } + boost::signals2::connection addNewMsgCallback(const session_signal_t::slot_type& cb ) { return mNewMsgSignal.connect(cb); } + boost::signals2::connection addNoUnreadMsgsCallback(const session_signal_t::slot_type& cb ) { return mNoUnreadMsgsSignal.connect(cb); } /** * Create new session object in a model diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 9ba8431fde..8fef2ed6d1 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -424,8 +424,8 @@ LLToastAlertPanel::~LLToastAlertPanel() LLTransientFloaterMgr::GLOBAL, this); // EXP-1822 - // return focus to the previously focused view - if (mPreviouslyFocusedView.get()) + // return focus to the previously focused view if the viewer is not exiting + if (mPreviouslyFocusedView.get() && !LLApp::isExiting()) { mPreviouslyFocusedView.get()->setFocus(TRUE); } -- cgit v1.2.3 From dd012cc375680c1907e16baa675d29d40ad4f43c Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 12 Apr 2012 23:09:47 +0300 Subject: CHUI-87 FIXED crash in handling notifications after viewer disconnect. Notification handlers now use LLHandles to screen channels. --- indra/newview/llimhandler.cpp | 12 ++++++------ indra/newview/llnearbychathandler.cpp | 11 +++++++---- indra/newview/llnotificationalerthandler.cpp | 18 +++++++++--------- indra/newview/llnotificationgrouphandler.cpp | 16 +++++++++------- indra/newview/llnotificationhandler.h | 4 ++-- indra/newview/llnotificationhandlerutil.cpp | 2 +- indra/newview/llnotificationofferhandler.cpp | 19 ++++++++++--------- indra/newview/llnotificationscripthandler.cpp | 20 ++++++++++---------- indra/newview/llnotificationtiphandler.cpp | 17 +++++++++-------- indra/newview/llscreenchannel.h | 3 +-- 10 files changed, 64 insertions(+), 58 deletions(-) diff --git a/indra/newview/llimhandler.cpp b/indra/newview/llimhandler.cpp index cd71da7393..07d73c8c66 100644 --- a/indra/newview/llimhandler.cpp +++ b/indra/newview/llimhandler.cpp @@ -42,7 +42,7 @@ LLIMHandler::LLIMHandler(e_notification_type type, const LLSD& id) mType = type; // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->createNotificationChannel(); + mChannel = LLChannelManager::getInstance()->createNotificationChannel()->getHandle(); } //-------------------------------------------------------------------------- @@ -55,13 +55,13 @@ void LLIMHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound); } //-------------------------------------------------------------------------- bool LLIMHandler::processNotification(const LLSD& notify) { - if(!mChannel) + if(mChannel.isDead()) { return false; } @@ -72,7 +72,7 @@ bool LLIMHandler::processNotification(const LLSD& notify) return false; // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } @@ -104,7 +104,7 @@ bool LLIMHandler::processNotification(const LLSD& notify) p.panel = im_box; p.can_be_stored = false; p.on_delete_toast = boost::bind(&LLIMHandler::onDeleteToast, this, _1); - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) channel->addToast(p); @@ -113,7 +113,7 @@ bool LLIMHandler::processNotification(const LLSD& notify) } else if (notify["sigtype"].asString() == "delete") { - mChannel->killToastByNotificationID(notification->getID()); + mChannel.get()->killToastByNotificationID(notification->getID()); } return false; } diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 240a7c7a35..600fd395fb 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -458,7 +458,9 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i channel->setCreatePanelCallback(callback); - mChannel = LLChannelManager::getInstance()->addChannel(channel); + LLChannelManager::getInstance()->addChannel(channel); + + mChannel = channel->getHandle(); } LLNearbyChatHandler::~LLNearbyChatHandler() @@ -558,11 +560,12 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, && nearby_chat->isInVisibleChain() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) - || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode + || mChannel.isDead() + || !mChannel.get()->getShowToasts() ) // to prevent toasts in Busy mode return;//no need in toast if chat is visible or if bubble chat is enabled // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } @@ -579,7 +582,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, } */ - LLNearbyChatScreenChannel* channel = dynamic_cast(mChannel); + LLNearbyChatScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) { diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp index cae7d02fed..89fe7bb3c2 100644 --- a/indra/newview/llnotificationalerthandler.cpp +++ b/indra/newview/llnotificationalerthandler.cpp @@ -51,8 +51,8 @@ LLAlertHandler::LLAlertHandler(e_notification_type type, const LLSD& id) : mIsMo p.channel_align = CA_CENTRE; // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->getChannel(p); - mChannel->setCanStoreToasts(false); + mChannel = LLChannelManager::getInstance()->getChannel(p)->getHandle(); + mChannel.get()->setCanStoreToasts(false); } //-------------------------------------------------------------------------- @@ -64,13 +64,13 @@ LLAlertHandler::~LLAlertHandler() void LLAlertHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().getWidth() / 2; - mChannel->init(channel_right_bound, channel_right_bound); + mChannel.get()->init(channel_right_bound, channel_right_bound); } //-------------------------------------------------------------------------- bool LLAlertHandler::processNotification(const LLSD& notify) { - if(!mChannel) + if(mChannel.isDead()) { return false; } @@ -81,7 +81,7 @@ bool LLAlertHandler::processNotification(const LLSD& notify) return false; // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } @@ -114,22 +114,22 @@ bool LLAlertHandler::processNotification(const LLSD& notify) // Show alert in middle of progress view (during teleport) (EXT-1093) LLProgressView* progress = gViewerWindow->getProgressView(); LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled(); - mChannel->updatePositionAndSize(rc); + mChannel.get()->updatePositionAndSize(rc); - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) channel->addToast(p); } else if (notify["sigtype"].asString() == "change") { LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal); - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) channel->modifyToastByNotificationID(notification->getID(), (LLToastPanel*)alert_dialog); } else { - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) channel->killToastByNotificationID(notification->getID()); } diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp index 9b7fdaef82..ad51389241 100644 --- a/indra/newview/llnotificationgrouphandler.cpp +++ b/indra/newview/llnotificationgrouphandler.cpp @@ -42,10 +42,12 @@ LLGroupHandler::LLGroupHandler(e_notification_type type, const LLSD& id) mType = type; // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->createNotificationChannel(); - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) + { channel->setOnRejectToastCallback(boost::bind(&LLGroupHandler::onRejectToast, this, _1)); + mChannel = channel->getHandle(); + } } //-------------------------------------------------------------------------- @@ -58,13 +60,13 @@ void LLGroupHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound); } //-------------------------------------------------------------------------- bool LLGroupHandler::processNotification(const LLSD& notify) { - if(!mChannel) + if(mChannel.isDead()) { return false; } @@ -75,7 +77,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify) return false; // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } @@ -91,7 +93,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify) p.panel = notify_box; p.on_delete_toast = boost::bind(&LLGroupHandler::onDeleteToast, this, _1); - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) channel->addToast(p); @@ -102,7 +104,7 @@ bool LLGroupHandler::processNotification(const LLSD& notify) } else if (notify["sigtype"].asString() == "delete") { - mChannel->killToastByNotificationID(notification->getID()); + mChannel.get()->killToastByNotificationID(notification->getID()); } return false; } diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 23dbb6b047..3569ad6447 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -103,8 +103,8 @@ protected: // at the moment, when a handlers creates a channel. virtual void initChannel()=0; - LLScreenChannelBase* mChannel; - e_notification_type mType; + LLHandle mChannel; + e_notification_type mType; }; diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 1b767e80d4..7c6287967a 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -64,7 +64,7 @@ LLSysHandler::LLSysHandler() void LLSysHandler::removeExclusiveNotifications(const LLNotificationPtr& notif) { - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = dynamic_cast(mChannel.get()); if (channel == NULL) { return; diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 68fd65be0f..1552ed3346 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -45,12 +45,13 @@ LLOfferHandler::LLOfferHandler(e_notification_type type, const LLSD& id) mType = type; // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->createNotificationChannel(); - mChannel->setControlHovering(true); - - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) + { + channel->setControlHovering(true); channel->setOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1)); + mChannel = channel->getHandle(); + } } //-------------------------------------------------------------------------- @@ -63,13 +64,13 @@ void LLOfferHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound); } //-------------------------------------------------------------------------- bool LLOfferHandler::processNotification(const LLSD& notify) { - if(!mChannel) + if(mChannel.isDead()) { return false; } @@ -80,7 +81,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) return false; // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } @@ -134,7 +135,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) // we not save offer notifications to the syswell floater that should be added to the IM floater p.can_be_stored = !add_notid_to_im; - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) channel->addToast(p); @@ -175,7 +176,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) { LLHandlerUtil::decIMMesageCounter(notification); } - mChannel->killToastByNotificationID(notification->getID()); + mChannel.get()->killToastByNotificationID(notification->getID()); } } diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index bbb4d03768..995915206b 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -47,13 +47,13 @@ LLScriptHandler::LLScriptHandler(e_notification_type type, const LLSD& id) mType = type; // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->createNotificationChannel(); - mChannel->setControlHovering(true); - - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) + { + channel->setControlHovering(true); channel->setOnRejectToastCallback(boost::bind(&LLScriptHandler::onRejectToast, this, _1)); - + mChannel = channel->getHandle(); + } } //-------------------------------------------------------------------------- @@ -66,13 +66,13 @@ void LLScriptHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound); } //-------------------------------------------------------------------------- bool LLScriptHandler::processNotification(const LLSD& notify) { - if(!mChannel) + if(mChannel.isDead()) { return false; } @@ -83,7 +83,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify) return false; // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } @@ -109,7 +109,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify) p.panel = notify_box; p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) { channel->addToast(p); @@ -127,7 +127,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify) } else { - mChannel->killToastByNotificationID(notification->getID()); + mChannel.get()->killToastByNotificationID(notification->getID()); } } return false; diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index fb0891c4c5..e397cfa046 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -46,11 +46,12 @@ LLTipHandler::LLTipHandler(e_notification_type type, const LLSD& id) mType = type; // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->createNotificationChannel(); - - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) + { channel->setOnRejectToastCallback(boost::bind(&LLTipHandler::onRejectToast, this, _1)); + mChannel = channel->getHandle(); + } } //-------------------------------------------------------------------------- @@ -63,13 +64,13 @@ void LLTipHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound); } //-------------------------------------------------------------------------- bool LLTipHandler::processNotification(const LLSD& notify) { - if(!mChannel) + if(mChannel.isDead()) { return false; } @@ -80,7 +81,7 @@ bool LLTipHandler::processNotification(const LLSD& notify) return false; // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } @@ -137,13 +138,13 @@ bool LLTipHandler::processNotification(const LLSD& notify) removeExclusiveNotifications(notification); - LLScreenChannel* channel = dynamic_cast(mChannel); + LLScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) channel->addToast(p); } else if (notify["sigtype"].asString() == "delete") { - mChannel->killToastByNotificationID(notification->getID()); + mChannel.get()->killToastByNotificationID(notification->getID()); } return false; } diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 695b6cd44d..56a9cf8b4b 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -117,7 +117,7 @@ public: // get ID of a channel LLUUID getChannelID() { return mID; } - LLHandle getHandle() { mRootHandle.bind(this); return mRootHandle; } + LLHandle getHandle() { return getDerivedHandle(); } protected: void updateRect(); @@ -130,7 +130,6 @@ protected: bool mDisplayToastsAlways; // controls whether a channel shows toasts or not bool mShowToasts; - LLRootHandle mRootHandle; // EToastAlignment mToastAlignment; EChannelAlignment mChannelAlignment; -- cgit v1.2.3 From 8d0c73dfd4a245ab02760a23255ef3c500ccac46 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Sat, 14 Apr 2012 00:54:59 +0300 Subject: Touched a file to fix the TC build. --- indra/llui/llnotifications.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 462d69be2e..3df2efcac3 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -690,7 +690,7 @@ typedef std::multimap LLNotificationMap; // Abstract base class (interface) for a channel; also used for the master container. // This lets us arrange channels into a call hierarchy. -// We maintain a heirarchy of notification channels; events are always started at the top +// We maintain a hierarchy of notification channels; events are always started at the top // and propagated through the hierarchy only if they pass a filter. // Any channel can be created with a parent. A null parent (empty string) means it's // tied to the root of the tree (the LLNotifications class itself). -- cgit v1.2.3 From c104c887c5c3d4e8c84b9d028bb4123701228551 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Tue, 17 Apr 2012 17:36:22 +0300 Subject: Mac build fix. --- indra/newview/llimview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index c4ea8c0d31..a7c4618fa4 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -171,8 +171,8 @@ void LLIMModel::setActiveSessionID(const LLUUID& session_id) LLIMModel::LLIMModel() { - addNewMsgCallback(LLIMFloater::newIMCallback); - addNewMsgCallback(toast_callback); + addNewMsgCallback(boost::bind(&LLIMFloater::newIMCallback, _1)); + addNewMsgCallback(boost::bind(&toast_callback, _1)); } LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice) -- cgit v1.2.3 From ee1124e1c02b1a8be0cc8d2cbce1083dca3b40a2 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 17 Apr 2012 13:42:53 -0700 Subject: Added tag viewer-beta-candidate, 3.3.1-beta2, DRTVWR-139 for changeset 1dc545e44617 --- .hgtags | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.hgtags b/.hgtags index 261b3ef140..6fa4900b02 100644 --- a/.hgtags +++ b/.hgtags @@ -279,3 +279,7 @@ d5f263687f43f278107363365938f0a214920a4b 3.3.0-beta1 5e8d2662f38a66eca6c591295f5880d47afc73f7 3.3.0-release dffd0457ee0745de65bf95f0642a5c9e46b8e2f0 viewer-beta-candidate 3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 viewer-beta-candidate +3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 viewer-beta-candidate +1dc545e44617975da2a4a32fe303386c687a6ca1 viewer-beta-candidate +1dc545e44617975da2a4a32fe303386c687a6ca1 3.3.1-beta2 +1dc545e44617975da2a4a32fe303386c687a6ca1 DRTVWR-139 -- cgit v1.2.3 From d6569db3520f7e0ce2d93febb6f4e26b48c08a3d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 24 Apr 2012 08:38:38 -0400 Subject: Added tag viewer-release-candidate, 3.3.1-release for changeset c623bbc854b6 --- .hgtags | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.hgtags b/.hgtags index 6fa4900b02..6edf9b0330 100644 --- a/.hgtags +++ b/.hgtags @@ -283,3 +283,6 @@ dffd0457ee0745de65bf95f0642a5c9e46b8e2f0 viewer-beta-candidate 1dc545e44617975da2a4a32fe303386c687a6ca1 viewer-beta-candidate 1dc545e44617975da2a4a32fe303386c687a6ca1 3.3.1-beta2 1dc545e44617975da2a4a32fe303386c687a6ca1 DRTVWR-139 +5e8d2662f38a66eca6c591295f5880d47afc73f7 viewer-release-candidate +c623bbc854b6f7ee1b33a3718f76715046aa2937 viewer-release-candidate +c623bbc854b6f7ee1b33a3718f76715046aa2937 3.3.1-release -- cgit v1.2.3 From 5ab4dadc703a0f7419929c7da57c471f2ece8a6c Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 25 Apr 2012 16:59:20 -0600 Subject: for subtasks SH-3118, SH-3112, SH-3110, SH-3106, SH-3091 for SH-3086: As a viewer architect, I would like to understand how fast each of the components of the texture pipeline can run in isolation --- indra/llmessage/llcurl.cpp | 2 +- indra/newview/CMakeLists.txt | 2 + indra/newview/llappviewer.cpp | 9 + indra/newview/llfloatertexturefetchdebugger.cpp | 330 ++++++++++++++++ indra/newview/llfloatertexturefetchdebugger.h | 70 ++++ indra/newview/lltexturefetch.cpp | 436 ++++++++++++++++++++- indra/newview/lltexturefetch.h | 148 ++++++- indra/newview/llviewerfloaterreg.cpp | 2 + indra/newview/llviewertexture.cpp | 7 +- indra/newview/llviewertexture.h | 1 + indra/newview/llviewertexturelist.h | 6 +- .../xui/en/floater_texture_fetch_debugger.xml | 292 ++++++++++++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 7 + 13 files changed, 1305 insertions(+), 7 deletions(-) create mode 100644 indra/newview/llfloatertexturefetchdebugger.cpp create mode 100644 indra/newview/llfloatertexturefetchdebugger.h create mode 100644 indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 3bcaffc275..f58a4f5caf 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -1506,7 +1506,7 @@ void LLCurl::cleanupClass() delete sHandleMutexp ; sHandleMutexp = NULL ; - llassert(Easy::sActiveHandles.empty()); + //llassert(Easy::sActiveHandles.empty()); } //static diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f85b943c70..6db97390aa 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -236,6 +236,7 @@ set(viewer_SOURCE_FILES llfloatertelehub.cpp llfloatertestinspectors.cpp llfloatertestlistview.cpp + llfloatertexturefetchdebugger.cpp llfloatertools.cpp llfloatertopobjects.cpp llfloatertos.cpp @@ -792,6 +793,7 @@ set(viewer_HEADER_FILES llfloatertelehub.h llfloatertestinspectors.h llfloatertestlistview.h + llfloatertexturefetchdebugger.h llfloatertools.h llfloatertopobjects.h llfloatertos.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a627f3868b..3ee53c679f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -93,6 +93,7 @@ #include "llsecondlifeurls.h" #include "llupdaterservice.h" #include "llcallfloater.h" +#include "llfloatertexturefetchdebugger.h" // Linden library includes #include "llavatarnamecache.h" @@ -1220,6 +1221,14 @@ bool LLAppViewer::mainLoop() mem_leak_instance->idle() ; } + //texture fetching debugger + LLFloaterTextureFetchDebugger* tex_fetch_debugger_instance = + LLFloaterReg::findTypedInstance("tex_fetch_debugger"); + if(tex_fetch_debugger_instance) + { + tex_fetch_debugger_instance->idle() ; + } + // canonical per-frame event mainloop.post(newFrame); diff --git a/indra/newview/llfloatertexturefetchdebugger.cpp b/indra/newview/llfloatertexturefetchdebugger.cpp new file mode 100644 index 0000000000..6756f9bbc1 --- /dev/null +++ b/indra/newview/llfloatertexturefetchdebugger.cpp @@ -0,0 +1,330 @@ +/** + * @file llfloatertexturefetchdebugger.cpp + * @brief LLFloaterTextureFetchDebugger class definition + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloatertexturefetchdebugger.h" + +#include "lluictrlfactory.h" +#include "llbutton.h" +#include "llspinctrl.h" +#include "llresmgr.h" + +#include "llmath.h" +#include "llviewerwindow.h" +#include "llappviewer.h" +#include "lltexturefetch.h" + +//static +F32 LLFloaterTextureFetchDebugger::sTexelPixelRatio = 1.0f; + +LLFloaterTextureFetchDebugger::LLFloaterTextureFetchDebugger(const LLSD& key) + : LLFloater(key), + mDebugger(NULL) +{ + setTitle("Texture Fetching Debugger Floater"); + + mCommitCallbackRegistrar.add("TexFetchDebugger.ChangeTexelPixelRatio", boost::bind(&LLFloaterTextureFetchDebugger::onChangeTexelPixelRatio, this)); + + mCommitCallbackRegistrar.add("TexFetchDebugger.Start", boost::bind(&LLFloaterTextureFetchDebugger::onClickStart, this)); + mCommitCallbackRegistrar.add("TexFetchDebugger.Clear", boost::bind(&LLFloaterTextureFetchDebugger::onClickClear, this)); + mCommitCallbackRegistrar.add("TexFetchDebugger.Close", boost::bind(&LLFloaterTextureFetchDebugger::onClickClose, this)); + + mCommitCallbackRegistrar.add("TexFetchDebugger.CacheRead", boost::bind(&LLFloaterTextureFetchDebugger::onClickCacheRead, this)); + mCommitCallbackRegistrar.add("TexFetchDebugger.CacheWrite", boost::bind(&LLFloaterTextureFetchDebugger::onClickCacheWrite, this)); + mCommitCallbackRegistrar.add("TexFetchDebugger.HTTPLoad", boost::bind(&LLFloaterTextureFetchDebugger::onClickHTTPLoad, this)); + mCommitCallbackRegistrar.add("TexFetchDebugger.Decode", boost::bind(&LLFloaterTextureFetchDebugger::onClickDecode, this)); + mCommitCallbackRegistrar.add("TexFetchDebugger.GLTexture", boost::bind(&LLFloaterTextureFetchDebugger::onClickGLTexture, this)); +} +//---------------------------------------------- + +BOOL LLFloaterTextureFetchDebugger::postBuild(void) +{ + mDebugger = LLAppViewer::getTextureFetch()->getFetchDebugger(); + + //set states for buttons + mButtonStateMap["start_btn"] = true; + mButtonStateMap["close_btn"] = true; + mButtonStateMap["clear_btn"] = true; + mButtonStateMap["cacheread_btn"] = false; + mButtonStateMap["cachewrite_btn"] = false; + mButtonStateMap["http_btn"] = false; + mButtonStateMap["decode_btn"] = false; + mButtonStateMap["gl_btn"] = false; + updateButtons(); + + return TRUE ; +} + +LLFloaterTextureFetchDebugger::~LLFloaterTextureFetchDebugger() +{ + //stop everything + mDebugger->stopDebug(); +} + +void LLFloaterTextureFetchDebugger::updateButtons() +{ + for(std::map::iterator iter = mButtonStateMap.begin(); iter != mButtonStateMap.end(); ++iter) + { + if(iter->second) + { + childEnable(iter->first.c_str()); + } + else + { + childDisable(iter->first.c_str()); + } + } +} + +void LLFloaterTextureFetchDebugger::disableButtons() +{ + childDisable("start_btn"); + childDisable("clear_btn"); + childDisable("cacheread_btn"); + childDisable("cachewrite_btn"); + childDisable("http_btn"); + childDisable("decode_btn"); + childDisable("gl_btn"); +} + +void LLFloaterTextureFetchDebugger::idle() +{ + LLTextureFetchDebugger::e_debug_state state = mDebugger->getState(); + + if(mDebugger->update()) + { + switch(state) + { + case LLTextureFetchDebugger::IDLE: + break; + case LLTextureFetchDebugger::READ_CACHE: + mButtonStateMap["cachewrite_btn"] = true; + mButtonStateMap["decode_btn"] = true; + updateButtons(); + break; + case LLTextureFetchDebugger::WRITE_CACHE: + updateButtons(); + break; + case LLTextureFetchDebugger::DECODING: + mButtonStateMap["gl_btn"] = true; + updateButtons(); + break; + case LLTextureFetchDebugger::HTTP_FETCHING: + mButtonStateMap["cacheread_btn"] = true; + mButtonStateMap["cachewrite_btn"] = true; + mButtonStateMap["decode_btn"] = true; + updateButtons(); + break; + case LLTextureFetchDebugger::GL_TEX: + updateButtons(); + break; + default: + break; + } + } +} + +//---------------------- +void LLFloaterTextureFetchDebugger::onChangeTexelPixelRatio() +{ + sTexelPixelRatio = getChild("texel_pixel_ratio")->getValue().asReal(); +} + +void LLFloaterTextureFetchDebugger::onClickStart() +{ + disableButtons(); + + mDebugger->startDebug(); + + mButtonStateMap["start_btn"] = false; + mButtonStateMap["cacheread_btn"] = true; + mButtonStateMap["http_btn"] = true; + updateButtons(); +} + +void LLFloaterTextureFetchDebugger::onClickClose() +{ + setVisible(FALSE); + + //stop everything + mDebugger->stopDebug(); +} + +void LLFloaterTextureFetchDebugger::onClickClear() +{ + mButtonStateMap["start_btn"] = true; + mButtonStateMap["close_btn"] = true; + mButtonStateMap["clear_btn"] = true; + mButtonStateMap["cacheread_btn"] = false; + mButtonStateMap["cachewrite_btn"] = false; + mButtonStateMap["http_btn"] = false; + mButtonStateMap["decode_btn"] = false; + mButtonStateMap["gl_btn"] = false; + updateButtons(); + + //stop everything + mDebugger->stopDebug(); + mDebugger->clearHistory(); +} + +void LLFloaterTextureFetchDebugger::onClickCacheRead() +{ + disableButtons(); + + mDebugger->debugCacheRead(); +} + +void LLFloaterTextureFetchDebugger::onClickCacheWrite() +{ + disableButtons(); + + mDebugger->debugCacheWrite(); +} + +void LLFloaterTextureFetchDebugger::onClickHTTPLoad() +{ + disableButtons(); + + mDebugger->debugHTTP(); +} + +void LLFloaterTextureFetchDebugger::onClickDecode() +{ + disableButtons(); + + mDebugger->debugDecoder(); +} + +void LLFloaterTextureFetchDebugger::onClickGLTexture() +{ + disableButtons(); + + mDebugger->debugGLTextureCreation(); +} + +void LLFloaterTextureFetchDebugger::draw() +{ + //total number of fetched textures + { + getChild("total_num_fetched_label")->setTextArg("[NUM]", llformat("%d", mDebugger->getNumFetchedTextures())); + } + + //total number of fetching requests + { + getChild("total_num_fetching_requests_label")->setTextArg("[NUM]", llformat("%d", mDebugger->getNumFetchingRequests())); + } + + //total number of cache hits + { + getChild("total_num_cache_hits_label")->setTextArg("[NUM]", llformat("%d", mDebugger->getNumCacheHits())); + } + + //total number of visible textures + { + getChild("total_num_visible_tex_label")->setTextArg("[NUM]", llformat("%d", mDebugger->getNumVisibleFetchedTextures())); + } + + //total number of visible texture fetching requests + { + getChild("total_num_visible_tex_fetch_req_label")->setTextArg("[NUM]", llformat("%d", mDebugger->getNumVisibleFetchingRequests())); + } + + //total number of fetched data + { + getChild("total_fetched_data_label")->setTextArg("[SIZE1]", llformat("%d", mDebugger->getFetchedData() >> 10)); + getChild("total_fetched_data_label")->setTextArg("[SIZE2]", llformat("%d", mDebugger->getDecodedData() >> 10)); + } + + //total number of visible fetched data + { + getChild("total_fetched_vis_data_label")->setTextArg("[SIZE1]", llformat("%d", mDebugger->getVisibleFetchedData() >> 10)); + getChild("total_fetched_vis_data_label")->setTextArg("[SIZE2]", llformat("%d", mDebugger->getVisibleDecodedData() >> 10)); + } + + //total number of rendered fetched data + { + getChild("total_fetched_rendered_data_label")->setTextArg("[SIZE1]", llformat("%d", mDebugger->getRenderedData() >> 10)); + getChild("total_fetched_rendered_data_label")->setTextArg("[SIZE2]", llformat("%d", mDebugger->getRenderedDecodedData() >> 10)); + } + + //total time on cache readings + if(mDebugger->getCacheReadTime() < 0.f) + { + getChild("total_time_cache_read_label")->setTextArg("[TIME]", std::string("----")); + } + else + { + getChild("total_time_cache_read_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getCacheReadTime())); + } + + //total time on cache writings + if(mDebugger->getCacheWriteTime() < 0.f) + { + getChild("total_time_cache_write_label")->setTextArg("[TIME]", std::string("----")); + } + else + { + getChild("total_time_cache_write_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getCacheWriteTime())); + } + + //total time on decoding + if(mDebugger->getDecodeTime() < 0.f) + { + getChild("total_time_decode_label")->setTextArg("[TIME]", std::string("----")); + } + else + { + getChild("total_time_decode_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getDecodeTime())); + } + + //total time on gl texture creation + if(mDebugger->getGLCreationTime() < 0.f) + { + getChild("total_time_gl_label")->setTextArg("[TIME]", std::string("----")); + } + else + { + getChild("total_time_gl_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getGLCreationTime())); + } + + //total time on HTTP fetching + if(mDebugger->getHTTPTime() < 0.f) + { + getChild("total_time_http_label")->setTextArg("[TIME]", std::string("----")); + } + else + { + getChild("total_time_http_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getHTTPTime())); + } + + //total time on entire fetching + { + getChild("total_time_fetch_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getTotalFetchingTime())); + } + + LLFloater::draw(); +} diff --git a/indra/newview/llfloatertexturefetchdebugger.h b/indra/newview/llfloatertexturefetchdebugger.h new file mode 100644 index 0000000000..9f2e62fd2c --- /dev/null +++ b/indra/newview/llfloatertexturefetchdebugger.h @@ -0,0 +1,70 @@ +/** + * @file llfloatertexturefetchdebugger.h + * @brief texture fetching debugger window, debug use only + * + * $LicenseInfo:firstyear=2004&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_FLOATER_TEXTURE_FETCH_DEBUGGER__H +#define LL_FLOATER_TEXTURE_FETCH_DEBUGGER__H + +#include "llfloater.h" +class LLTextureFetchDebugger; + +class LLFloaterTextureFetchDebugger : public LLFloater +{ + friend class LLFloaterReg; +public: + /// initialize all the callbacks for the menu + + virtual BOOL postBuild() ; + virtual void draw() ; + + void onChangeTexelPixelRatio(); + + void onClickStart(); + void onClickClear(); + void onClickClose(); + + void onClickCacheRead(); + void onClickCacheWrite(); + void onClickHTTPLoad(); + void onClickDecode(); + void onClickGLTexture(); + +public: + void idle() ; + +private: + LLFloaterTextureFetchDebugger(const LLSD& key); + virtual ~LLFloaterTextureFetchDebugger(); + + void updateButtons(); + void disableButtons(); +private: + static F32 sTexelPixelRatio; + + LLTextureFetchDebugger* mDebugger; + std::map mButtonStateMap; +}; + +#endif // LL_FLOATER_TEXTURE_FETCH_DEBUGGER__H diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 2e1b409fa7..d7742219bf 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -54,6 +54,7 @@ #include "llworld.h" #include "llsdutil.h" #include "llstartup.h" +#include "llviewerstats.h" LLStat LLTextureFetch::sCacheHitRate("texture_cache_hits", 128); LLStat LLTextureFetch::sCacheReadLatency("texture_cache_read_latency", 128); @@ -63,6 +64,7 @@ class LLTextureFetchWorker : public LLWorkerClass { friend class LLTextureFetch; friend class HTTPGetResponder; + friend class LLTextureFetchDebugger; private: class CacheReadResponder : public LLTextureCache::ReadResponder @@ -265,6 +267,7 @@ private: BOOL mNeedsAux; BOOL mHaveAllData; BOOL mInLocalCache; + BOOL mInCache; bool mCanUseHTTP ; bool mCanUseNET ; //can get from asset server. S32 mHTTPFailCount; @@ -677,6 +680,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, mNeedsAux(FALSE), mHaveAllData(FALSE), mInLocalCache(FALSE), + mInCache(FALSE), mCanUseHTTP(true), mHTTPFailCount(0), mRetryAttempt(0), @@ -906,6 +910,7 @@ bool LLTextureFetchWorker::doWork(S32 param) mCacheReadHandle = LLTextureCache::nullHandle(); mCacheWriteHandle = LLTextureCache::nullHandle(); mState = LOAD_FROM_TEXTURE_CACHE; + mInCache = FALSE; mDesiredSize = llmax(mDesiredSize, TEXTURE_CACHE_ENTRY_SIZE); // min desired size is TEXTURE_CACHE_ENTRY_SIZE LL_DEBUGS("Texture") << mID << ": Priority: " << llformat("%8.0f",mImagePriority) << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL; @@ -994,6 +999,7 @@ bool LLTextureFetchWorker::doWork(S32 param) llassert_always(mFormattedImage->getDataSize() > 0); mLoadedDiscard = mDesiredDiscard; mState = DECODE_IMAGE; + mInCache = TRUE; mWriteToCacheState = NOT_WRITE ; LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize() << " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight()) @@ -1418,6 +1424,11 @@ bool LLTextureFetchWorker::doWork(S32 param) { if (mDecoded) { + if(!mInLocalCache) + { + mFetcher->getFetchDebugger()->addHistoryEntry(this); + } + if (mDecodedDiscard < 0) { LL_DEBUGS("Texture") << mID << ": Failed to Decode." << LL_ENDL; @@ -1852,6 +1863,8 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image mCurlPOSTRequestCount = 0; mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), gSavedSettings.getU32("TextureLoggingThreshold")); + + mFetchDebugger = new LLTextureFetchDebugger(this, cache, imagedecodethread) ; } LLTextureFetch::~LLTextureFetch() @@ -1866,11 +1879,17 @@ LLTextureFetch::~LLTextureFetch() } // ~LLQueuedThread() called here + + delete mFetchDebugger; } bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http) { + if(mFetcherLocked) + { + return false; + } if (mDebugPause) { return false; @@ -2292,6 +2311,7 @@ void LLTextureFetch::startThread() { // Construct mCurlGetRequest from Worker Thread mCurlGetRequest = new LLCurlRequest(); + mFetchDebugger->setCurlGetRequest(mCurlGetRequest); } // WORKER THREAD @@ -2300,6 +2320,7 @@ void LLTextureFetch::endThread() // Destroy mCurlGetRequest from Worker Thread delete mCurlGetRequest; mCurlGetRequest = NULL; + mFetchDebugger->setCurlGetRequest(NULL); } // WORKER THREAD @@ -2837,7 +2858,6 @@ void LLTextureFetch::cmdDoWork() } } - ////////////////////////////////////////////////////////////////////////////// // Private (anonymous) class methods implementing the command scheme. @@ -3041,5 +3061,419 @@ truncate_viewer_metrics(int max_regions, LLSD & metrics) } // end of anonymous namespace +/////////////////////////////////////////////////////////////////////////////////////////// +//Start LLTextureFetchDebugger +/////////////////////////////////////////////////////////////////////////////////////////// +//--------------------- +class LLDebuggerCacheReadResponder : public LLTextureCache::ReadResponder +{ +public: + LLDebuggerCacheReadResponder(LLTextureFetchDebugger* debugger, S32 id, LLImageFormatted* image) + : mDebugger(debugger), mID(id) + { + setImage(image); + } + virtual void completed(bool success) + { + mDebugger->callbackCacheRead(mID, success, mFormattedImage, mImageSize, mImageLocal); + } +private: + LLTextureFetchDebugger* mDebugger; + S32 mID; +}; + +class LLDebuggerCacheWriteResponder : public LLTextureCache::WriteResponder +{ +public: + LLDebuggerCacheWriteResponder(LLTextureFetchDebugger* debugger, S32 id) + : mDebugger(debugger), mID(id) + { + } + virtual void completed(bool success) + { + mDebugger->callbackCacheWrite(mID, success); + } +private: + LLTextureFetchDebugger* mDebugger; + S32 mID; +}; + +class LLDebuggerDecodeResponder : public LLImageDecodeThread::Responder +{ +public: + LLDebuggerDecodeResponder(LLTextureFetchDebugger* debugger, S32 id) + : mDebugger(debugger), mID(id) + { + } + virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux) + { + mDebugger->callbackDecoded(mID, success, raw, aux); + } +private: + LLTextureFetchDebugger* mDebugger; + S32 mID; +}; + +LLTextureFetchDebugger::LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextureCache* cache, LLImageDecodeThread* imagedecodethread) : + mFetcher(fetcher), + mTextureCache(cache), + mImageDecodeThread(imagedecodethread), + mCurlGetRequest(NULL) +{ + init(); +} + +LLTextureFetchDebugger::~LLTextureFetchDebugger() +{ + mFetchingHistory.clear(); + stopDebug(); +} + +void LLTextureFetchDebugger::init() +{ + mState = IDLE; + + mCacheReadTime = -1.f; + mCacheWriteTime = -1.f; + mDecodingTime = -1.f; + mHTTPTime = -1.f; + mGLCreationTime = -1.f; + mTotalFetchingTime = 0.f; + + mNumFetchedTextures = 0; + mNumCacheHits = 0; + mNumVisibleFetchedTextures = 0; + mNumVisibleFetchingRequests = 0; + mFetchedData = 0; + mDecodedData = 0; + mVisibleFetchedData = 0; + mVisibleDecodedData = 0; + mRenderedData = 0; + mRenderedDecodedData = 0; +} + +void LLTextureFetchDebugger::startDebug() +{ + //lock the fetcher + mFetcher->lockFetcher(true); + + //clear the current fetching queue + gTextureList.clearFetchingRequests(); + + //wait for all works to be done + while(1) + { + S32 pending = 0; + pending += LLAppViewer::getTextureCache()->update(1); + pending += LLAppViewer::getImageDecodeThread()->update(1); + pending += LLAppViewer::getTextureFetch()->update(1); + if(!pending) + { + break; + } + } + + //collect statistics + mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime; + + std::set fetched_textures; + S32 size = mFetchingHistory.size(); + for(S32 i = 0 ; i < size; i++) + { + bool in_list = true; + if(fetched_textures.find(mFetchingHistory[i].mID) == fetched_textures.end()) + { + fetched_textures.insert(mFetchingHistory[i].mID); + in_list = false; + } + + LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(mFetchingHistory[i].mID); + if(tex && tex->isJustBound()) //visible + { + if(!in_list) + { + mNumVisibleFetchedTextures++; + } + mNumVisibleFetchingRequests++; + + mVisibleFetchedData += mFetchingHistory[i].mFetchedSize; + mVisibleDecodedData += mFetchingHistory[i].mDecodedSize; + + if(tex->getDiscardLevel() >= mFetchingHistory[i].mDecodedLevel) + { + mRenderedData += mFetchingHistory[i].mFetchedSize; + mRenderedDecodedData += mFetchingHistory[i].mDecodedSize; + } + } + } + + mNumFetchedTextures = fetched_textures.size(); +} + +void LLTextureFetchDebugger::stopDebug() +{ + //clear the current debug work + S32 size = mFetchingHistory.size(); + switch(mState) + { + case READ_CACHE: + for(S32 i = 0 ; i < size; i++) + { + if (mFetchingHistory[i]. mCacheHandle != LLTextureCache::nullHandle()) + { + mTextureCache->readComplete(mFetchingHistory[i].mCacheHandle, true); + } + } + break; + case WRITE_CACHE: + for(S32 i = 0 ; i < size; i++) + { + if (mFetchingHistory[i].mCacheHandle != LLTextureCache::nullHandle()) + { + mTextureCache->writeComplete(mFetchingHistory[i].mCacheHandle, true); + } + } + break; + case DECODING: + break; + case HTTP_FETCHING: + break; + case GL_TEX: + break; + default: + break; + } + + while(1) + { + if(update()) + { + break; + } + } + + //unlock the fetcher + mFetcher->lockFetcher(false); +} + +//called in the main thread and when the fetching queue is empty +void LLTextureFetchDebugger::clearHistory() +{ + mFetchingHistory.clear(); + init(); +} + +void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker) +{ + if(worker->mInCache) + { + mNumCacheHits++; + } + mFetchedData += worker->mFormattedImage->getDataSize(); + mDecodedData += worker->mRawImage->getDataSize(); + + mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); + //mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mHaveAllData ? 0 : worker->mLoadedDiscard, worker->mFormattedImage->getComponents(), + //worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); +} + +void LLTextureFetchDebugger::lockCache() +{ +} + +void LLTextureFetchDebugger::unlockCache() +{ +} + +void LLTextureFetchDebugger::debugCacheRead() +{ + lockCache(); + llassert_always(mState == IDLE); + mTimer.reset(); + mState = READ_CACHE; + + S32 size = mFetchingHistory.size(); + for(S32 i = 0 ; i < size ; i++) + { + mFetchingHistory[i].mFormattedImage = NULL; + mFetchingHistory[i].mCacheHandle = mTextureCache->readFromCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL, 0, mFetchingHistory[i].mFetchedSize, + new LLDebuggerCacheReadResponder(this, i, mFetchingHistory[i].mFormattedImage)); + } +} + +void LLTextureFetchDebugger::debugCacheWrite() +{ + //remove from cache + S32 size = mFetchingHistory.size(); + { + std::set deleted_list; + for(S32 i = 0 ; i < size ; i++) + { + if(deleted_list.find(mFetchingHistory[i].mID) == deleted_list.end()) + { + deleted_list.insert(mFetchingHistory[i].mID); + mTextureCache->removeFromCache(mFetchingHistory[i].mID); + } + } + } + + lockCache(); + llassert_always(mState == IDLE); + mTimer.reset(); + mState = WRITE_CACHE; + + for(S32 i = 0 ; i < size ; i++) + { + mFetchingHistory[i].mCacheHandle = mTextureCache->writeToCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL, + mFetchingHistory[i].mFormattedImage->getData(), mFetchingHistory[i].mFetchedSize, + mFetchingHistory[i].mDecodedLevel == 0 ? mFetchingHistory[i].mFetchedSize : mFetchingHistory[i].mFetchedSize + 1, + new LLDebuggerCacheWriteResponder(this, i)); + } +} + +void LLTextureFetchDebugger::lockDecoder() +{ +} + +void LLTextureFetchDebugger::unlockDecoder() +{ +} + +void LLTextureFetchDebugger::debugDecoder() +{ + lockDecoder(); + llassert_always(mState == IDLE); + mTimer.reset(); + mState = DECODING; + + S32 size = mFetchingHistory.size(); + for(S32 i = 0 ; i < size ; i++) + { + if(mFetchingHistory[i].mFormattedImage.isNull()) + { + continue; + } + + mImageDecodeThread->decodeImage(mFetchingHistory[i].mFormattedImage, LLWorkerThread::PRIORITY_NORMAL, + mFetchingHistory[i].mDecodedLevel, mFetchingHistory[i].mNeedsAux, + new LLDebuggerDecodeResponder(this, i)); + } +} + +void LLTextureFetchDebugger::debugHTTP() +{ + llinfos << "debug HTTP" << llendl; +} + +void LLTextureFetchDebugger::debugGLTextureCreation() +{ + llassert_always(mState == IDLE); + mState = GL_TEX; + std::vector tex_list; + + S32 size = mFetchingHistory.size(); + for(S32 i = 0 ; i < size ; i++) + { + if(mFetchingHistory[i].mRawImage.notNull()) + { + LLViewerFetchedTexture* tex = gTextureList.findImage(mFetchingHistory[i].mID) ; + if(tex && !tex->isForSculptOnly()) + { + tex->destroyGLTexture() ; + tex_list.push_back(tex); + } + } + } + + mTimer.reset(); + S32 j = 0 ; + for(S32 i = 0 ; i < size ; i++) + { + if(mFetchingHistory[i].mRawImage.notNull()) + { + if(mFetchingHistory[i].mID == tex_list[j]->getID()) + { + tex_list[j]->createGLTexture(mFetchingHistory[i].mDecodedLevel, mFetchingHistory[i].mRawImage, 0, TRUE, tex_list[j]->getBoostLevel()); + j++; + } + } + } + + mGLCreationTime = mTimer.getElapsedTimeF32() ; + return; +} + +bool LLTextureFetchDebugger::update() +{ + switch(mState) + { + case READ_CACHE: + if(!mTextureCache->update(1)) + { + mCacheReadTime = mTimer.getElapsedTimeF32() ; + mState = IDLE; + unlockCache(); + } + break; + case WRITE_CACHE: + if(!mTextureCache->update(1)) + { + mCacheWriteTime = mTimer.getElapsedTimeF32() ; + mState = IDLE; + unlockCache(); + } + break; + case DECODING: + if(!mImageDecodeThread->update(1)) + { + mDecodingTime = mTimer.getElapsedTimeF32() ; + mState = IDLE; + unlockDecoder(); + } + break; + case HTTP_FETCHING: + mState = IDLE; + break; + case GL_TEX: + mState = IDLE; + break; + default: + mState = IDLE; + break; + } + + return mState == IDLE; +} + +void LLTextureFetchDebugger::callbackCacheRead(S32 id, bool success, LLImageFormatted* image, + S32 imagesize, BOOL islocal) +{ + if (success) + { + mFetchingHistory[id].mFormattedImage = image; + } + mTextureCache->readComplete(mFetchingHistory[id].mCacheHandle, false); + mFetchingHistory[id].mCacheHandle = LLTextureCache::nullHandle(); +} + +void LLTextureFetchDebugger::callbackCacheWrite(S32 id, bool success) +{ + mTextureCache->writeComplete(mFetchingHistory[id].mCacheHandle); + mFetchingHistory[id].mCacheHandle = LLTextureCache::nullHandle(); +} + +void LLTextureFetchDebugger::callbackDecoded(S32 id, bool success, LLImageRaw* raw, LLImageRaw* aux) +{ + if (success) + { + llassert_always(raw); + mFetchingHistory[id].mRawImage = raw; + } +} + +//--------------------- +/////////////////////////////////////////////////////////////////////////////////////////// +//End LLTextureFetchDebugger +/////////////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 710dd67e99..529a2e6834 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -34,14 +34,17 @@ #include "llcurl.h" #include "lltextureinfo.h" #include "llapr.h" +#include "llimageworker.h" +//#include "lltexturecache.h" class LLViewerTexture; class LLTextureFetchWorker; class HTTPGetResponder; -class LLTextureCache; class LLImageDecodeThread; class LLHost; class LLViewerAssetStats; +class LLTextureFetchDebugger; +class LLTextureCache; // Interface class class LLTextureFetch : public LLWorkerThread @@ -212,7 +215,150 @@ public: // attempt to log metrics follows a break in the metrics stream // reporting due to either startup or a problem POSTing data. static volatile bool svMetricsDataBreak; + +private: + //debug use + LLTextureFetchDebugger* mFetchDebugger; + bool mFetcherLocked; + +public: + //debug use + LLTextureFetchDebugger* getFetchDebugger() { return mFetchDebugger;} + void lockFetcher(bool lock) { mFetcherLocked = lock;} }; +//debug use +class LLTextureFetchDebugger +{ +public: + LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextureCache* cache, LLImageDecodeThread* imagedecodethread) ; + ~LLTextureFetchDebugger(); + +public: + enum e_debug_state + { + IDLE = 0, + READ_CACHE, + WRITE_CACHE, + DECODING, + HTTP_FETCHING, + GL_TEX, + INVALID + }; + +private: + struct FetchEntry + { + LLUUID mID; + //S32 mRequestedSize; + //S32 mFetchedDiscard; + //S32 mComponents; + S32 mDecodedLevel; + S32 mFetchedSize; + S32 mDecodedSize; + BOOL mNeedsAux; + U32 mCacheHandle; + LLPointer mFormattedImage; + LLPointer mRawImage; + + FetchEntry() : + mDecodedLevel(-1), + mFetchedSize(0), + mDecodedSize(0) + {} + FetchEntry(LLUUID& id, /*S32 r_size, S32 f_discard, S32 c,*/ S32 level, S32 f_size, S32 d_size) : + mID(id), + //mRequestedSize(r_size), + //mFetchedDiscard(f_discard), + //mComponents(c), + mDecodedLevel(level), + mFetchedSize(f_size), + mDecodedSize(d_size), + mNeedsAux(false) + {} + }; + std::vector mFetchingHistory; + + e_debug_state mState; + + F32 mCacheReadTime; + F32 mCacheWriteTime; + F32 mDecodingTime; + F32 mHTTPTime; + F32 mGLCreationTime; + + LLTimer mTimer; + + LLTextureFetch* mFetcher; + LLTextureCache* mTextureCache; + LLImageDecodeThread* mImageDecodeThread; + LLCurlRequest* mCurlGetRequest; + + F32 mTotalFetchingTime; + S32 mNumFetchedTextures; + S32 mNumCacheHits; + S32 mNumVisibleFetchedTextures; + S32 mNumVisibleFetchingRequests; + U32 mFetchedData; + U32 mDecodedData; + U32 mVisibleFetchedData; + U32 mVisibleDecodedData; + U32 mRenderedData; + U32 mRenderedDecodedData; + +public: + bool update(); //called in the main thread once per frame + + //fetching history + void clearHistory(); + void addHistoryEntry(LLTextureFetchWorker* worker); + + void setCurlGetRequest(LLCurlRequest* request) { mCurlGetRequest = request;} + + void startDebug(); + void stopDebug(); //stop everything + void debugCacheRead(); + void debugCacheWrite(); + void debugHTTP(); + void debugDecoder(); + void debugGLTextureCreation(); + + void callbackCacheRead(S32 id, bool success, LLImageFormatted* image, + S32 imagesize, BOOL islocal); + void callbackCacheWrite(S32 id, bool success); + void callbackDecoded(S32 id, bool success, LLImageRaw* raw, LLImageRaw* aux); + + e_debug_state getState() {return mState;} + S32 getNumFetchedTextures() {return mNumFetchedTextures;} + S32 getNumFetchingRequests() {return mFetchingHistory.size();} + S32 getNumCacheHits() {return mNumCacheHits;} + S32 getNumVisibleFetchedTextures() {return mNumVisibleFetchedTextures;} + S32 getNumVisibleFetchingRequests() {return mNumVisibleFetchingRequests;} + U32 getFetchedData() {return mFetchedData;} + U32 getDecodedData() {return mDecodedData;} + U32 getVisibleFetchedData() {return mVisibleFetchedData;} + U32 getVisibleDecodedData() {return mVisibleDecodedData;} + U32 getRenderedData() {return mRenderedData;} + U32 getRenderedDecodedData() {return mRenderedDecodedData;} + + F32 getCacheReadTime() {return mCacheReadTime;} + F32 getCacheWriteTime() {return mCacheWriteTime;} + F32 getDecodeTime() {return mDecodingTime;} + F32 getGLCreationTime() {return mGLCreationTime;} + F32 getHTTPTime() {return mHTTPTime;} + F32 getTotalFetchingTime() {return mTotalFetchingTime;} + +private: + void init(); + + void lockFetcher(); + void unlockFetcher(); + + void lockCache(); + void unlockCache(); + + void lockDecoder(); + void unlockDecoder(); +}; #endif // LL_LLTEXTUREFETCH_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index bb870f7651..986b8ac3c5 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -103,6 +103,7 @@ #include "llfloatertelehub.h" #include "llfloatertestinspectors.h" #include "llfloatertestlistview.h" +#include "llfloatertexturefetchdebugger.h" #include "llfloatertools.h" #include "llfloatertos.h" #include "llfloatertopobjects.h" @@ -227,6 +228,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("tex_fetch_debugger", "floater_texture_fetch_debugger.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("media_settings", "floater_media_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("message_critical", "floater_critical.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("message_tos", "floater_tos.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index d5b53f3cb1..49faae3fdb 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -178,7 +178,12 @@ LLViewerTexture* LLViewerTextureManager::findTexture(const LLUUID& id) } return tex ; } - + +LLViewerFetchedTexture* LLViewerTextureManager::findFetchedTexture(const LLUUID& id) +{ + return gTextureList.findImage(id); +} + LLViewerMediaTexture* LLViewerTextureManager::findMediaTexture(const LLUUID &media_id) { return LLViewerMediaTexture::findMediaTexture(media_id) ; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 6ddff3e485..d0bc534c5a 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -701,6 +701,7 @@ public: //"find-texture" just check if the texture exists, if yes, return it, otherwise return null. // static LLViewerTexture* findTexture(const LLUUID& id) ; + static LLViewerFetchedTexture* findFetchedTexture(const LLUUID& id) ; static LLViewerMediaTexture* findMediaTexture(const LLUUID& id) ; static LLViewerMediaTexture* createMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ; diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 64e2c1f791..7038ea24ce 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -109,6 +109,8 @@ public: void doPreloadImages(); void doPrefetchImages(); + void clearFetchingRequests(); + static S32 getMinVideoRamSetting(); static S32 getMaxVideoRamSetting(bool get_recommended = false); @@ -163,9 +165,7 @@ private: // Request image from a specific host, used for baked avatar textures. // Implemented in header in case someone changes default params above. JC LLViewerFetchedTexture* getImageFromHost(const LLUUID& image_id, LLHost host) - { return getImage(image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); } - - void clearFetchingRequests(); + { return getImage(image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); } public: typedef std::set > image_list_t; diff --git a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml new file mode 100644 index 0000000000..ff7528eeb7 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml @@ -0,0 +1,292 @@ + + + + 1, Total number of fetched textures: [NUM] + + + 2, Total number of fetching requests: [NUM] + + + 3, Total number of cache hits: [NUM] + + + 4, Total number of visible textures: [NUM] + + + 5, Total number of visible texture fetching requests: [NUM] + + + 6, Total number of fetched data/Decoded Data: [SIZE1]KB / [SIZE2]KB + + + 7, Total number of visible fetched data/Decoded Data: [SIZE1]KB / [SIZE2]KB + + + 8, Total number of rendered fetched data/Decoded Data: [SIZE1]KB / [SIZE2]KB + + + 9, Total time on cache readings: [TIME] seconds + + + 10, Total time on cache writings: [TIME] seconds + + + 11, Total time on decodings: [TIME] seconds + + + 12, Total time on gl texture creation: [TIME] seconds + + + 13, Total time on HTTP fetching: [TIME] seconds + + + 14, Total time on entire fetching: [TIME] seconds + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 8b0152b1a2..a1f17ffc17 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1877,6 +1877,13 @@ function="Advanced.ToggleConsole" parameter="texture" /> + + + Date: Thu, 26 Apr 2012 15:53:35 -0600 Subject: For SH-3121: collect time of reloading all textures from cache and through HTTP when all objects loading are done. --- indra/newview/llappviewer.cpp | 18 ++--- indra/newview/llfloatertexturefetchdebugger.cpp | 60 ++++++++++++++++ indra/newview/llfloatertexturefetchdebugger.h | 2 + indra/newview/lltexturefetch.cpp | 83 +++++++++++++++++++++- indra/newview/lltexturefetch.h | 26 ++++++- indra/newview/llviewertexture.cpp | 8 +++ indra/newview/llviewertexture.h | 2 + .../xui/en/floater_texture_fetch_debugger.xml | 64 ++++++++++++++--- 8 files changed, 242 insertions(+), 21 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3ee53c679f..bb6658dc48 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1219,15 +1219,7 @@ bool LLAppViewer::mainLoop() if(mem_leak_instance) { mem_leak_instance->idle() ; - } - - //texture fetching debugger - LLFloaterTextureFetchDebugger* tex_fetch_debugger_instance = - LLFloaterReg::findTypedInstance("tex_fetch_debugger"); - if(tex_fetch_debugger_instance) - { - tex_fetch_debugger_instance->idle() ; - } + } // canonical per-frame event mainloop.post(newFrame); @@ -1412,6 +1404,14 @@ bool LLAppViewer::mainLoop() LLLFSThread::sLocal->pause(); } + //texture fetching debugger + LLFloaterTextureFetchDebugger* tex_fetch_debugger_instance = + LLFloaterReg::findTypedInstance("tex_fetch_debugger"); + if(tex_fetch_debugger_instance) + { + tex_fetch_debugger_instance->idle() ; + } + if ((LLStartUp::getStartupState() >= STATE_CLEANUP) && (frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD)) { diff --git a/indra/newview/llfloatertexturefetchdebugger.cpp b/indra/newview/llfloatertexturefetchdebugger.cpp index 6756f9bbc1..448c562134 100644 --- a/indra/newview/llfloatertexturefetchdebugger.cpp +++ b/indra/newview/llfloatertexturefetchdebugger.cpp @@ -58,6 +58,9 @@ LLFloaterTextureFetchDebugger::LLFloaterTextureFetchDebugger(const LLSD& key) mCommitCallbackRegistrar.add("TexFetchDebugger.HTTPLoad", boost::bind(&LLFloaterTextureFetchDebugger::onClickHTTPLoad, this)); mCommitCallbackRegistrar.add("TexFetchDebugger.Decode", boost::bind(&LLFloaterTextureFetchDebugger::onClickDecode, this)); mCommitCallbackRegistrar.add("TexFetchDebugger.GLTexture", boost::bind(&LLFloaterTextureFetchDebugger::onClickGLTexture, this)); + + mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchVisCache", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchVisCache, this)); + mCommitCallbackRegistrar.add("TexFetchDebugger.RefetchVisHTTP", boost::bind(&LLFloaterTextureFetchDebugger::onClickRefetchVisHTTP, this)); } //---------------------------------------------- @@ -74,6 +77,10 @@ BOOL LLFloaterTextureFetchDebugger::postBuild(void) mButtonStateMap["http_btn"] = false; mButtonStateMap["decode_btn"] = false; mButtonStateMap["gl_btn"] = false; + + mButtonStateMap["refetchviscache_btn"] = true; + mButtonStateMap["refetchvishttp_btn"] = true; + updateButtons(); return TRUE ; @@ -109,6 +116,8 @@ void LLFloaterTextureFetchDebugger::disableButtons() childDisable("http_btn"); childDisable("decode_btn"); childDisable("gl_btn"); + childDisable("refetchviscache_btn"); + childDisable("refetchvishttp_btn"); } void LLFloaterTextureFetchDebugger::idle() @@ -142,6 +151,11 @@ void LLFloaterTextureFetchDebugger::idle() case LLTextureFetchDebugger::GL_TEX: updateButtons(); break; + case LLTextureFetchDebugger::REFETCH_VIS_CACHE: + updateButtons(); + case LLTextureFetchDebugger::REFETCH_VIS_HTTP: + updateButtons(); + break; default: break; } @@ -184,6 +198,8 @@ void LLFloaterTextureFetchDebugger::onClickClear() mButtonStateMap["http_btn"] = false; mButtonStateMap["decode_btn"] = false; mButtonStateMap["gl_btn"] = false; + mButtonStateMap["refetchviscache_btn"] = true; + mButtonStateMap["refetchvishttp_btn"] = true; updateButtons(); //stop everything @@ -226,6 +242,20 @@ void LLFloaterTextureFetchDebugger::onClickGLTexture() mDebugger->debugGLTextureCreation(); } +void LLFloaterTextureFetchDebugger::onClickRefetchVisCache() +{ + disableButtons(); + + mDebugger->debugRefetchVisibleFromCache(); +} + +void LLFloaterTextureFetchDebugger::onClickRefetchVisHTTP() +{ + disableButtons(); + + mDebugger->debugRefetchVisibleFromHTTP(); +} + void LLFloaterTextureFetchDebugger::draw() { //total number of fetched textures @@ -257,6 +287,7 @@ void LLFloaterTextureFetchDebugger::draw() { getChild("total_fetched_data_label")->setTextArg("[SIZE1]", llformat("%d", mDebugger->getFetchedData() >> 10)); getChild("total_fetched_data_label")->setTextArg("[SIZE2]", llformat("%d", mDebugger->getDecodedData() >> 10)); + getChild("total_fetched_data_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getFetchedPixels() / 1000000.f)); } //total number of visible fetched data @@ -269,6 +300,7 @@ void LLFloaterTextureFetchDebugger::draw() { getChild("total_fetched_rendered_data_label")->setTextArg("[SIZE1]", llformat("%d", mDebugger->getRenderedData() >> 10)); getChild("total_fetched_rendered_data_label")->setTextArg("[SIZE2]", llformat("%d", mDebugger->getRenderedDecodedData() >> 10)); + getChild("total_fetched_rendered_data_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRenderedPixels() / 1000000.f)); } //total time on cache readings @@ -326,5 +358,33 @@ void LLFloaterTextureFetchDebugger::draw() getChild("total_time_fetch_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getTotalFetchingTime())); } + //total time on refetching visible textures from cache + if(mDebugger->getRefetchVisCacheTime() < 0.f) + { + getChild("total_time_refetch_vis_cache_label")->setTextArg("[TIME]", std::string("----")); + getChild("total_time_refetch_vis_cache_label")->setTextArg("[SIZE]", std::string("----")); + getChild("total_time_refetch_vis_cache_label")->setTextArg("[PIXEL]", std::string("----")); + } + else + { + getChild("total_time_refetch_vis_cache_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchVisCacheTime())); + getChild("total_time_refetch_vis_cache_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedData() >> 10)); + getChild("total_time_refetch_vis_cache_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedPixels() / 1000000.f)); + } + + //total time on refetching visible textures from http + if(mDebugger->getRefetchVisHTTPTime() < 0.f) + { + getChild("total_time_refetch_vis_http_label")->setTextArg("[TIME]", std::string("----")); + getChild("total_time_refetch_vis_http_label")->setTextArg("[SIZE]", std::string("----")); + getChild("total_time_refetch_vis_http_label")->setTextArg("[PIXEL]", std::string("----")); + } + else + { + getChild("total_time_refetch_vis_http_label")->setTextArg("[TIME]", llformat("%.3f", mDebugger->getRefetchVisHTTPTime())); + getChild("total_time_refetch_vis_http_label")->setTextArg("[SIZE]", llformat("%d", mDebugger->getRefetchedData() >> 10)); + getChild("total_time_refetch_vis_http_label")->setTextArg("[PIXEL]", llformat("%.3f", mDebugger->getRefetchedPixels() / 1000000.f)); + } + LLFloater::draw(); } diff --git a/indra/newview/llfloatertexturefetchdebugger.h b/indra/newview/llfloatertexturefetchdebugger.h index 9f2e62fd2c..7181dc04d5 100644 --- a/indra/newview/llfloatertexturefetchdebugger.h +++ b/indra/newview/llfloatertexturefetchdebugger.h @@ -51,6 +51,8 @@ public: void onClickDecode(); void onClickGLTexture(); + void onClickRefetchVisCache(); + void onClickRefetchVisHTTP(); public: void idle() ; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index d7742219bf..2816c16261 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -3139,6 +3139,8 @@ void LLTextureFetchDebugger::init() mHTTPTime = -1.f; mGLCreationTime = -1.f; mTotalFetchingTime = 0.f; + mRefetchVisCacheTime = -1.f; + mRefetchVisHTTPTime = -1.f; mNumFetchedTextures = 0; mNumCacheHits = 0; @@ -3150,12 +3152,19 @@ void LLTextureFetchDebugger::init() mVisibleDecodedData = 0; mRenderedData = 0; mRenderedDecodedData = 0; + mFetchedPixels = 0; + mRenderedPixels = 0; + mRefetchedData = 0; + mRefetchedPixels = 0; + + mFreezeHistory = FALSE; } void LLTextureFetchDebugger::startDebug() { //lock the fetcher mFetcher->lockFetcher(true); + mFreezeHistory = TRUE; //clear the current fetching queue gTextureList.clearFetchingRequests(); @@ -3203,6 +3212,7 @@ void LLTextureFetchDebugger::startDebug() { mRenderedData += mFetchingHistory[i].mFetchedSize; mRenderedDecodedData += mFetchingHistory[i].mDecodedSize; + mRenderedPixels += tex->getWidth() * tex->getHeight(); } } } @@ -3254,6 +3264,8 @@ void LLTextureFetchDebugger::stopDebug() //unlock the fetcher mFetcher->lockFetcher(false); + mFreezeHistory = FALSE; + mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset } //called in the main thread and when the fetching queue is empty @@ -3265,12 +3277,20 @@ void LLTextureFetchDebugger::clearHistory() void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker) { + if(mFreezeHistory) + { + mRefetchedPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight(); + mRefetchedData += worker->mFormattedImage->getDataSize(); + return; + } + if(worker->mInCache) { mNumCacheHits++; } mFetchedData += worker->mFormattedImage->getDataSize(); mDecodedData += worker->mRawImage->getDataSize(); + mFetchedPixels += worker->mRawImage->getWidth() * worker->mRawImage->getHeight(); mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); //mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mHaveAllData ? 0 : worker->mLoadedDiscard, worker->mFormattedImage->getComponents(), @@ -3301,9 +3321,8 @@ void LLTextureFetchDebugger::debugCacheRead() } } -void LLTextureFetchDebugger::debugCacheWrite() +void LLTextureFetchDebugger::clearCache() { - //remove from cache S32 size = mFetchingHistory.size(); { std::set deleted_list; @@ -3316,12 +3335,19 @@ void LLTextureFetchDebugger::debugCacheWrite() } } } +} + +void LLTextureFetchDebugger::debugCacheWrite() +{ + //remove from cache + clearCache(); lockCache(); llassert_always(mState == IDLE); mTimer.reset(); mState = WRITE_CACHE; + S32 size = mFetchingHistory.size(); for(S32 i = 0 ; i < size ; i++) { mFetchingHistory[i].mCacheHandle = mTextureCache->writeToCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL, @@ -3403,6 +3429,43 @@ void LLTextureFetchDebugger::debugGLTextureCreation() return; } +//clear fetching results of all textures. +void LLTextureFetchDebugger::clearTextures() +{ + S32 size = mFetchingHistory.size(); + for(S32 i = 0 ; i < size ; i++) + { + LLViewerFetchedTexture* tex = gTextureList.findImage(mFetchingHistory[i].mID) ; + if(tex) + { + tex->clearFetchedResults() ; + } + } +} + +void LLTextureFetchDebugger::debugRefetchVisibleFromCache() +{ + llassert_always(mState == IDLE); + mState = REFETCH_VIS_CACHE; + + clearTextures(); + + mTimer.reset(); + mFetcher->lockFetcher(false); +} + +void LLTextureFetchDebugger::debugRefetchVisibleFromHTTP() +{ + llassert_always(mState == IDLE); + mState = REFETCH_VIS_HTTP; + + clearCache(); + clearTextures(); + + mTimer.reset(); + mFetcher->lockFetcher(false); +} + bool LLTextureFetchDebugger::update() { switch(mState) @@ -3437,6 +3500,22 @@ bool LLTextureFetchDebugger::update() case GL_TEX: mState = IDLE; break; + case REFETCH_VIS_CACHE: + if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) + { + mRefetchVisCacheTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime; + mState = IDLE; + mFetcher->lockFetcher(true); + } + break; + case REFETCH_VIS_HTTP: + if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) + { + mRefetchVisHTTPTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime; + mState = IDLE; + mFetcher->lockFetcher(true); + } + break; default: mState = IDLE; break; diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 529a2e6834..fc8855089c 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -243,6 +243,10 @@ public: DECODING, HTTP_FETCHING, GL_TEX, + REFETCH_VIS_CACHE, + REFETCH_VIS_HTTP, + REFETCH_ALL_CACHE, + REFETCH_ALL_HTTP, INVALID }; @@ -287,14 +291,17 @@ private: F32 mHTTPTime; F32 mGLCreationTime; + F32 mTotalFetchingTime; + F32 mRefetchVisCacheTime; + F32 mRefetchVisHTTPTime; + LLTimer mTimer; LLTextureFetch* mFetcher; LLTextureCache* mTextureCache; LLImageDecodeThread* mImageDecodeThread; LLCurlRequest* mCurlGetRequest; - - F32 mTotalFetchingTime; + S32 mNumFetchedTextures; S32 mNumCacheHits; S32 mNumVisibleFetchedTextures; @@ -305,7 +312,12 @@ private: U32 mVisibleDecodedData; U32 mRenderedData; U32 mRenderedDecodedData; + U32 mFetchedPixels; + U32 mRenderedPixels; + U32 mRefetchedData; + U32 mRefetchedPixels; + BOOL mFreezeHistory; public: bool update(); //called in the main thread once per frame @@ -322,6 +334,8 @@ public: void debugHTTP(); void debugDecoder(); void debugGLTextureCreation(); + void debugRefetchVisibleFromCache(); + void debugRefetchVisibleFromHTTP(); void callbackCacheRead(S32 id, bool success, LLImageFormatted* image, S32 imagesize, BOOL islocal); @@ -340,6 +354,10 @@ public: U32 getVisibleDecodedData() {return mVisibleDecodedData;} U32 getRenderedData() {return mRenderedData;} U32 getRenderedDecodedData() {return mRenderedDecodedData;} + U32 getFetchedPixels() {return mFetchedPixels;} + U32 getRenderedPixels() {return mRenderedPixels;} + U32 getRefetchedData() {return mRefetchedData;} + U32 getRefetchedPixels() {return mRefetchedPixels;} F32 getCacheReadTime() {return mCacheReadTime;} F32 getCacheWriteTime() {return mCacheWriteTime;} @@ -347,9 +365,13 @@ public: F32 getGLCreationTime() {return mGLCreationTime;} F32 getHTTPTime() {return mHTTPTime;} F32 getTotalFetchingTime() {return mTotalFetchingTime;} + F32 getRefetchVisCacheTime() {return mRefetchVisCacheTime;} + F32 getRefetchVisHTTPTime() {return mRefetchVisHTTPTime;} private: void init(); + void clearTextures();//clear fetching results of all textures. + void clearCache(); void lockFetcher(); void unlockFetcher(); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 49faae3fdb..a7e2ed85fa 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2144,6 +2144,14 @@ bool LLViewerFetchedTexture::updateFetch() return mIsFetching ? true : false; } +void LLViewerFetchedTexture::clearFetchedResults() +{ + llassert_always(!mNeedsCreateTexture && !mIsFetching); + + cleanup(); + destroyGLTexture(); +} + void LLViewerFetchedTexture::forceToDeleteRequest() { if (mHasFetcher) diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index d0bc534c5a..95896f9d41 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -433,6 +433,8 @@ public: bool updateFetch(); + void clearFetchedResults(); //clear all fetched results, for debug use. + // Override the computation of discard levels if we know the exact output // size of the image. Used for UI textures to not decode, even if we have // more data. diff --git a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml index ff7528eeb7..7f95d0e84b 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml @@ -2,12 +2,12 @@ + width="540"> - 6, Total number of fetched data/Decoded Data: [SIZE1]KB / [SIZE2]KB + width="530"> + 6, Total number of fetched data: [SIZE1]KB, Decoded Data: [SIZE2]KB, [PIXEL]MPixels - 7, Total number of visible fetched data/Decoded Data: [SIZE1]KB / [SIZE2]KB + 7, Total number of visible data: [SIZE1]KB, Decoded Data: [SIZE2]KB - 8, Total number of rendered fetched data/Decoded Data: [SIZE1]KB / [SIZE2]KB + width="530"> + 8, Total number of rendered data: [SIZE1]KB, Decoded Data: [SIZE2]KB, [PIXEL]MPixels 14, Total time on entire fetching: [TIME] seconds + + 15, Refetching visibles from cache, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels + + + 16, Refetching visibles from HTTP, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels + + + -- cgit v1.2.3 From 1df7655588a26529882a0ec97a7f23195f813468 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 26 Apr 2012 16:55:06 -0600 Subject: for SH-3097: introducing texel pixel ration adjustment --- indra/newview/app_settings/settings.xml | 13 ++++++++++++- indra/newview/llfloatertexturefetchdebugger.cpp | 8 ++++---- indra/newview/llfloatertexturefetchdebugger.h | 3 +-- indra/newview/llviewertexture.cpp | 3 +++ .../skins/default/xui/en/floater_texture_fetch_debugger.xml | 5 +++-- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index eb3fcc30ee..d24d1ebd6d 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10631,6 +10631,17 @@ Value 20.0 + TexelPixelRatio + + Comment + texel pixel ratio = texel / pixel + Persist + 1 + Type + F32 + Value + 1.0 + TextureCameraMotionThreshold Comment @@ -10640,7 +10651,7 @@ Type F32 Value - 0.2 + 0.2 TextureCameraMotionBoost diff --git a/indra/newview/llfloatertexturefetchdebugger.cpp b/indra/newview/llfloatertexturefetchdebugger.cpp index 448c562134..2b34b72055 100644 --- a/indra/newview/llfloatertexturefetchdebugger.cpp +++ b/indra/newview/llfloatertexturefetchdebugger.cpp @@ -37,9 +37,7 @@ #include "llviewerwindow.h" #include "llappviewer.h" #include "lltexturefetch.h" - -//static -F32 LLFloaterTextureFetchDebugger::sTexelPixelRatio = 1.0f; +#include "llviewercontrol.h" LLFloaterTextureFetchDebugger::LLFloaterTextureFetchDebugger(const LLSD& key) : LLFloater(key), @@ -83,6 +81,8 @@ BOOL LLFloaterTextureFetchDebugger::postBuild(void) updateButtons(); + getChild("texel_pixel_ratio")->setValue(gSavedSettings.getF32("TexelPixelRatio")); + return TRUE ; } @@ -165,7 +165,7 @@ void LLFloaterTextureFetchDebugger::idle() //---------------------- void LLFloaterTextureFetchDebugger::onChangeTexelPixelRatio() { - sTexelPixelRatio = getChild("texel_pixel_ratio")->getValue().asReal(); + gSavedSettings.setF32("TexelPixelRatio", getChild("texel_pixel_ratio")->getValue().asReal()); } void LLFloaterTextureFetchDebugger::onClickStart() diff --git a/indra/newview/llfloatertexturefetchdebugger.h b/indra/newview/llfloatertexturefetchdebugger.h index 7181dc04d5..33012c6a3d 100644 --- a/indra/newview/llfloatertexturefetchdebugger.h +++ b/indra/newview/llfloatertexturefetchdebugger.h @@ -62,9 +62,8 @@ private: void updateButtons(); void disableButtons(); -private: - static F32 sTexelPixelRatio; +private: LLTextureFetchDebugger* mDebugger; std::map mButtonStateMap; }; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index a7e2ed85fa..6137b7176f 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -722,11 +722,14 @@ void LLViewerTexture::forceImmediateUpdate() void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const { + static LLCachedControl sTexelPixelRatio(gSavedSettings,"TexelPixelRatio"); + if(needs_gltexture) { mNeedsGLTexture = TRUE ; } + virtual_size *= sTexelPixelRatio; if(!mMaxVirtualSizeResetCounter) { //flag to reset the values because the old values are used. diff --git a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml index 7f95d0e84b..0e8b85e3a7 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml @@ -204,13 +204,14 @@ decimal_digits="1" follows="left|top" height="20" - increment="0.1" + increment="0.01" initial_value="1.0" label="17, Ratio of Texel/Pixel:" label_width="130" layout="topleft" left_delta="0" - max_val="128.0" + max_val="10.0" + min_val="0.01" name="texel_pixel_ratio" top_delta="30" width="200"> -- cgit v1.2.3 From e703232cae0e692c813ba119e283ffd2d150fec8 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 26 Apr 2012 18:01:17 -0600 Subject: a fix for SH-3097 --- indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml index 0e8b85e3a7..44b6a63bca 100644 --- a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml +++ b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml @@ -201,7 +201,7 @@ 16, Refetching visibles from HTTP, Time: [TIME] seconds, Fetched: [SIZE]KB, [PIXEL]MPixels Date: Thu, 26 Apr 2012 23:55:40 -0700 Subject: SH-3104 : Implemented HTTP bulk fetch for texture debug console --- indra/newview/lltexturefetch.cpp | 136 ++++++++++++++++++++++++++++++++++++++- indra/newview/lltexturefetch.h | 24 ++++++- 2 files changed, 154 insertions(+), 6 deletions(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index d7742219bf..8b6f006db1 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -3114,6 +3114,42 @@ private: S32 mID; }; +class LLDebuggerHTTPResponder : public LLCurl::Responder +{ +public: + LLDebuggerHTTPResponder(LLTextureFetchDebugger* debugger, S32 index) + : mDebugger(debugger), mIndex(index) + { + } + virtual void completedRaw(U32 status, const std::string& reason, + const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) + { + bool success = false; + bool partial = false; + if (HTTP_OK <= status && status < HTTP_MULTIPLE_CHOICES) + { + success = true; + if (HTTP_PARTIAL_CONTENT == status) // partial information + { + partial = true; + } + } + if (!success) + { + llinfos << "Fetch Debugger : CURL GET FAILED, index = " << mIndex << ", status:" << status << " reason:" << reason << llendl; + } + mDebugger->callbackHTTP(mIndex, channels, buffer, partial, success); + } + virtual bool followRedir() + { + return true; + } +private: + LLTextureFetchDebugger* mDebugger; + S32 mIndex; +}; + LLTextureFetchDebugger::LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextureCache* cache, LLImageDecodeThread* imagedecodethread) : mFetcher(fetcher), mTextureCache(cache), @@ -3272,7 +3308,7 @@ void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker) mFetchedData += worker->mFormattedImage->getDataSize(); mDecodedData += worker->mRawImage->getDataSize(); - mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); + mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); //mFetchingHistory.push_back(FetchEntry(worker->mID, worker->mDesiredSize, worker->mHaveAllData ? 0 : worker->mLoadedDiscard, worker->mFormattedImage->getComponents(), //worker->mDecodedDiscard, worker->mFormattedImage->getDataSize(), worker->mRawImage->getDataSize())); } @@ -3362,7 +3398,71 @@ void LLTextureFetchDebugger::debugDecoder() void LLTextureFetchDebugger::debugHTTP() { - llinfos << "debug HTTP" << llendl; + llassert_always(mState == IDLE); + + LLViewerRegion* region = gAgent.getRegion(); + if (!region) + { + llinfos << "Fetch Debugger : Current region undefined. Cannot fetch textures through HTTP." << llendl; + return; + } + + mHTTPUrl = region->getHttpUrl(); + if (mHTTPUrl.empty()) + { + llinfos << "Fetch Debugger : Current region URL undefined. Cannot fetch textures through HTTP." << llendl; + return; + } + + mTimer.reset(); + mState = HTTP_FETCHING; + + S32 size = mFetchingHistory.size(); + for (S32 i = 0 ; i < size ; i++) + { + mFetchingHistory[i].mCurlState = FetchEntry::CURL_NOT_DONE; + mFetchingHistory[i].mCurlReceivedSize = 0; + } + mNbCurlRequests = 0; + mNbCurlCompleted = 0; + + fillCurlQueue(); +} + +S32 LLTextureFetchDebugger::fillCurlQueue() +{ + if (mNbCurlRequests == 24) + return mNbCurlRequests; + + S32 size = mFetchingHistory.size(); + for (S32 i = 0 ; i < size ; i++) + { + if (mFetchingHistory[i].mCurlState != FetchEntry::CURL_NOT_DONE) + continue; + std::string texture_url = mHTTPUrl + "/?texture_id=" + mFetchingHistory[i].mID.asString().c_str(); + S32 requestedSize = mFetchingHistory[i].mRequestedSize; + // We request the whole file if the size was not set. + requestedSize = llmax(0,requestedSize); + // We request the whole file if the size was set to an absurdly high value (meaning all file) + requestedSize = (requestedSize == 33554432 ? 0 : requestedSize); + std::vector headers; + headers.push_back("Accept: image/x-j2c"); + bool res = mCurlGetRequest->getByteRange(texture_url, headers, 0, requestedSize, new LLDebuggerHTTPResponder(this, i)); + if (res) + { + mFetchingHistory[i].mCurlState = FetchEntry::CURL_IN_PROGRESS; + mNbCurlRequests++; + // Hack + if (mNbCurlRequests == 24) + break; + } + else + { + break; + } + } + llinfos << "Fetch Debugger : Having " << mNbCurlRequests << " requests through the curl thread." << llendl; + return mNbCurlRequests; } void LLTextureFetchDebugger::debugGLTextureCreation() @@ -3432,7 +3532,13 @@ bool LLTextureFetchDebugger::update() } break; case HTTP_FETCHING: - mState = IDLE; + mCurlGetRequest->process(); + LLCurl::getCurlThread()->update(1); + if (!fillCurlQueue()) + { + mHTTPTime = mTimer.getElapsedTimeF32() ; + mState = IDLE; + } break; case GL_TEX: mState = IDLE; @@ -3471,6 +3577,30 @@ void LLTextureFetchDebugger::callbackDecoded(S32 id, bool success, LLImageRaw* r } } +void LLTextureFetchDebugger::callbackHTTP(S32 id, const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer, + bool partial, bool success) +{ + mNbCurlRequests--; + if (success) + { + S32 data_size = buffer->countAfter(channels.in(), NULL); + mFetchingHistory[id].mCurlReceivedSize += data_size; + llinfos << "Fetch Debugger : got results for " << id << ", data_size = " << data_size << ", received = " << mFetchingHistory[id].mCurlReceivedSize << ", requested = " << mFetchingHistory[id].mRequestedSize << ", partial = " << partial << llendl; + if ((mFetchingHistory[id].mCurlReceivedSize >= mFetchingHistory[id].mRequestedSize) || !partial || (mFetchingHistory[id].mRequestedSize == 600)) + { + mFetchingHistory[id].mCurlState = FetchEntry::CURL_DONE; + mNbCurlCompleted++; + } + } + else + { + // Fetch will have to be redone + mFetchingHistory[id].mCurlState = FetchEntry::CURL_NOT_DONE; + } +} + + //--------------------- /////////////////////////////////////////////////////////////////////////////////////////// //End LLTextureFetchDebugger diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 529a2e6834..892857c816 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -249,8 +249,14 @@ public: private: struct FetchEntry { + enum e_curl_state + { + CURL_NOT_DONE = 0, + CURL_IN_PROGRESS, + CURL_DONE + }; LLUUID mID; - //S32 mRequestedSize; + S32 mRequestedSize; //S32 mFetchedDiscard; //S32 mComponents; S32 mDecodedLevel; @@ -260,15 +266,17 @@ private: U32 mCacheHandle; LLPointer mFormattedImage; LLPointer mRawImage; + e_curl_state mCurlState; + S32 mCurlReceivedSize; FetchEntry() : mDecodedLevel(-1), mFetchedSize(0), mDecodedSize(0) {} - FetchEntry(LLUUID& id, /*S32 r_size, S32 f_discard, S32 c,*/ S32 level, S32 f_size, S32 d_size) : + FetchEntry(LLUUID& id, S32 r_size, /*S32 f_discard, S32 c,*/ S32 level, S32 f_size, S32 d_size) : mID(id), - //mRequestedSize(r_size), + mRequestedSize(r_size), //mFetchedDiscard(f_discard), //mComponents(c), mDecodedLevel(level), @@ -306,6 +314,10 @@ private: U32 mRenderedData; U32 mRenderedDecodedData; + std::string mHTTPUrl; + S32 mNbCurlRequests; + S32 mNbCurlCompleted; + public: bool update(); //called in the main thread once per frame @@ -327,6 +339,10 @@ public: S32 imagesize, BOOL islocal); void callbackCacheWrite(S32 id, bool success); void callbackDecoded(S32 id, bool success, LLImageRaw* raw, LLImageRaw* aux); + void callbackHTTP(S32 id, const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer, + bool partial, bool success); + e_debug_state getState() {return mState;} S32 getNumFetchedTextures() {return mNumFetchedTextures;} @@ -359,6 +375,8 @@ private: void lockDecoder(); void unlockDecoder(); + + S32 fillCurlQueue(); }; #endif // LL_LLTEXTUREFETCH_H -- cgit v1.2.3 From ed78cc00008b13e4a108635e851b9936688647d0 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 27 Apr 2012 12:43:14 -0600 Subject: fix some flaws for SH-3104 --- indra/newview/lltexturefetch.cpp | 46 ++++++++++++++++++++++++++++++++-------- indra/newview/lltexturefetch.h | 8 +++---- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 0906626743..f2d8c27db7 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -3448,6 +3448,7 @@ void LLTextureFetchDebugger::debugHTTP() { mFetchingHistory[i].mCurlState = FetchEntry::CURL_NOT_DONE; mFetchingHistory[i].mCurlReceivedSize = 0; + mFetchingHistory[i].mHTTPFailCount = 0; } mNbCurlRequests = 0; mNbCurlCompleted = 0; @@ -3487,7 +3488,7 @@ S32 LLTextureFetchDebugger::fillCurlQueue() break; } } - llinfos << "Fetch Debugger : Having " << mNbCurlRequests << " requests through the curl thread." << llendl; + //llinfos << "Fetch Debugger : Having " << mNbCurlRequests << " requests through the curl thread." << llendl; return mNbCurlRequests; } @@ -3513,7 +3514,8 @@ void LLTextureFetchDebugger::debugGLTextureCreation() mTimer.reset(); S32 j = 0 ; - for(S32 i = 0 ; i < size ; i++) + S32 size1 = tex_list.size(); + for(S32 i = 0 ; i < size && j < size1; i++) { if(mFetchingHistory[i].mRawImage.notNull()) { @@ -3597,7 +3599,7 @@ bool LLTextureFetchDebugger::update() case HTTP_FETCHING: mCurlGetRequest->process(); LLCurl::getCurlThread()->update(1); - if (!fillCurlQueue()) + if (!fillCurlQueue() && mNbCurlCompleted == mFetchingHistory.size()) { mHTTPTime = mTimer.getElapsedTimeF32() ; mState = IDLE; @@ -3663,19 +3665,45 @@ void LLTextureFetchDebugger::callbackHTTP(S32 id, const LLChannelDescriptors& ch mNbCurlRequests--; if (success) { + mFetchingHistory[id].mCurlState = FetchEntry::CURL_DONE; + mNbCurlCompleted++; + S32 data_size = buffer->countAfter(channels.in(), NULL); mFetchingHistory[id].mCurlReceivedSize += data_size; - llinfos << "Fetch Debugger : got results for " << id << ", data_size = " << data_size << ", received = " << mFetchingHistory[id].mCurlReceivedSize << ", requested = " << mFetchingHistory[id].mRequestedSize << ", partial = " << partial << llendl; + //llinfos << "Fetch Debugger : got results for " << id << ", data_size = " << data_size << ", received = " << mFetchingHistory[id].mCurlReceivedSize << ", requested = " << mFetchingHistory[id].mRequestedSize << ", partial = " << partial << llendl; if ((mFetchingHistory[id].mCurlReceivedSize >= mFetchingHistory[id].mRequestedSize) || !partial || (mFetchingHistory[id].mRequestedSize == 600)) { - mFetchingHistory[id].mCurlState = FetchEntry::CURL_DONE; - mNbCurlCompleted++; + U8* d_buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size); + buffer->readAfter(channels.in(), NULL, d_buffer, data_size); + + llassert_always(mFetchingHistory[id].mFormattedImage.isNull()); + { + // For now, create formatted image based on extension + std::string texture_url = mHTTPUrl + "/?texture_id=" + mFetchingHistory[id].mID.asString().c_str(); + std::string extension = gDirUtilp->getExtension(texture_url); + mFetchingHistory[id].mFormattedImage = LLImageFormatted::createFromType(LLImageBase::getCodecFromExtension(extension)); + if (mFetchingHistory[id].mFormattedImage.isNull()) + { + mFetchingHistory[id].mFormattedImage = new LLImageJ2C; // default + } + } + + mFetchingHistory[id].mFormattedImage->setData(d_buffer, data_size); } } - else + else //failed { - // Fetch will have to be redone - mFetchingHistory[id].mCurlState = FetchEntry::CURL_NOT_DONE; + mFetchingHistory[id].mHTTPFailCount++; + if(mFetchingHistory[id].mHTTPFailCount < 5) + { + // Fetch will have to be redone + mFetchingHistory[id].mCurlState = FetchEntry::CURL_NOT_DONE; + } + else //skip + { + mFetchingHistory[id].mCurlState = FetchEntry::CURL_DONE; + mNbCurlCompleted++; + } } } diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 1538fd78ab..3b08389042 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -261,8 +261,6 @@ private: }; LLUUID mID; S32 mRequestedSize; - //S32 mFetchedDiscard; - //S32 mComponents; S32 mDecodedLevel; S32 mFetchedSize; S32 mDecodedSize; @@ -272,6 +270,7 @@ private: LLPointer mRawImage; e_curl_state mCurlState; S32 mCurlReceivedSize; + S32 mHTTPFailCount; FetchEntry() : mDecodedLevel(-1), @@ -281,12 +280,11 @@ private: FetchEntry(LLUUID& id, S32 r_size, /*S32 f_discard, S32 c,*/ S32 level, S32 f_size, S32 d_size) : mID(id), mRequestedSize(r_size), - //mFetchedDiscard(f_discard), - //mComponents(c), mDecodedLevel(level), mFetchedSize(f_size), mDecodedSize(d_size), - mNeedsAux(false) + mNeedsAux(false), + mHTTPFailCount(0) {} }; std::vector mFetchingHistory; -- cgit v1.2.3 From 9c4380a03a7b9d18cdd44662ca56cf44c4766e6f Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 27 Apr 2012 14:27:48 -0600 Subject: fix a crash on cache write --- indra/newview/lltexturefetch.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index f2d8c27db7..59a125dcc5 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -3386,10 +3386,13 @@ void LLTextureFetchDebugger::debugCacheWrite() S32 size = mFetchingHistory.size(); for(S32 i = 0 ; i < size ; i++) { - mFetchingHistory[i].mCacheHandle = mTextureCache->writeToCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL, - mFetchingHistory[i].mFormattedImage->getData(), mFetchingHistory[i].mFetchedSize, - mFetchingHistory[i].mDecodedLevel == 0 ? mFetchingHistory[i].mFetchedSize : mFetchingHistory[i].mFetchedSize + 1, - new LLDebuggerCacheWriteResponder(this, i)); + if(mFetchingHistory[i].mFormattedImage.notNull()) + { + mFetchingHistory[i].mCacheHandle = mTextureCache->writeToCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL, + mFetchingHistory[i].mFormattedImage->getData(), mFetchingHistory[i].mFetchedSize, + mFetchingHistory[i].mDecodedLevel == 0 ? mFetchingHistory[i].mFetchedSize : mFetchingHistory[i].mFetchedSize + 1, + new LLDebuggerCacheWriteResponder(this, i)); + } } } -- cgit v1.2.3 From 3a9aa29a44f8b20ff9aa5c5eeaf7efccc81ae608 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 27 Apr 2012 16:38:16 -0600 Subject: fix for a crash on "refetch vis cache" --- indra/newview/llviewertexture.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 6137b7176f..1b468a7b96 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1305,6 +1305,7 @@ void LLViewerFetchedTexture::cleanup() mCachedRawDiscardLevel = -1 ; mCachedRawImageReady = FALSE ; mSavedRawImage = NULL ; + mSavedRawDiscardLevel = -1; } void LLViewerFetchedTexture::setForSculpt() -- cgit v1.2.3 From 164de6c1807a5517cbd2ccf7d16b536aa333e64a Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 27 Apr 2012 18:32:42 -0600 Subject: fix for a crash on sculpt --- indra/llrender/llimagegl.cpp | 4 ++-- indra/newview/llviewertexture.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index ab744fb7ff..bd9953e418 100755 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1464,10 +1464,10 @@ void LLImageGL::destroyGLTexture() } LLImageGL::deleteTextures(1, &mTexName); - mTexName = 0; - mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel. + mTexName = 0; mGLTextureCreated = FALSE ; } + mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel. } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 1b468a7b96..f27e20c2a2 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1146,7 +1146,7 @@ S32 LLViewerTexture::getDiscardLevelInAtlas() const void LLViewerTexture::destroyGLTexture() { - if(mGLTexturep.notNull() && mGLTexturep->getHasGLTexture()) + if(mGLTexturep.notNull()) { mGLTexturep->destroyGLTexture() ; mTextureState = DELETED ; -- cgit v1.2.3 From 3f31c82a1c7a9419891ff2c7b81324e99414395e Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 30 Apr 2012 17:44:44 -0700 Subject: SH-3124 : Fix crash on exit on Mac --- indra/newview/llviewertexture.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index f27e20c2a2..a889cd9637 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -390,6 +390,7 @@ void LLViewerTextureManager::cleanup() LLImageGL::sDefaultGLTexture = NULL ; LLViewerTexture::sNullImagep = NULL; LLViewerTexture::sBlackImagep = NULL; + LLViewerTexture::sCheckerBoardImagep = NULL; LLViewerFetchedTexture::sDefaultImagep = NULL; LLViewerFetchedTexture::sSmokeImagep = NULL; LLViewerFetchedTexture::sMissingAssetImagep = NULL; @@ -2156,16 +2157,16 @@ void LLViewerFetchedTexture::clearFetchedResults() destroyGLTexture(); } -void LLViewerFetchedTexture::forceToDeleteRequest() -{ - if (mHasFetcher) - { - LLAppViewer::getTextureFetch()->deleteRequest(getID(), true); - mHasFetcher = FALSE; - mIsFetching = FALSE ; - resetTextureStats(); - } -} +void LLViewerFetchedTexture::forceToDeleteRequest() +{ + if (mHasFetcher) + { + LLAppViewer::getTextureFetch()->deleteRequest(getID(), true); + mHasFetcher = FALSE; + mIsFetching = FALSE ; + resetTextureStats(); + } +} void LLViewerFetchedTexture::setIsMissingAsset() { -- cgit v1.2.3 From c0855030de1e0811b3db8b8d98d089956fda24c8 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 30 Apr 2012 19:10:55 -0700 Subject: Fix sculpties being deleted while being still in use in the scene --- 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 a889cd9637..90ba21ef34 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1147,7 +1147,7 @@ S32 LLViewerTexture::getDiscardLevelInAtlas() const void LLViewerTexture::destroyGLTexture() { - if(mGLTexturep.notNull()) + if(mGLTexturep.notNull() && mGLTexturep->getHasGLTexture()) { mGLTexturep->destroyGLTexture() ; mTextureState = DELETED ; -- cgit v1.2.3 From aa44ec81e18fa91e718e1a22606b3f385bb8170f Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 1 May 2012 16:49:28 -0600 Subject: for SH-3118: add a toggle "TextureFetchDebuggerEnabled" to turn the console on and off. --- indra/newview/app_settings/settings.xml | 11 ++++++++++ indra/newview/llappviewer.cpp | 13 +++++++----- indra/newview/lltexturefetch.cpp | 23 ++++++++++++++++----- indra/newview/lltexturefetch.h | 6 ++++++ indra/newview/llviewerfloaterreg.cpp | 6 +++++- indra/newview/llviewermenu.cpp | 11 ++++++++++ indra/newview/llviewertexture.cpp | 5 +++-- indra/newview/llviewertexture.h | 1 + indra/newview/skins/default/xui/en/menu_viewer.xml | 24 ++++++++++++++-------- 9 files changed, 78 insertions(+), 22 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d24d1ebd6d..c2f3d244f3 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10697,6 +10697,17 @@ Value 0 + TextureFetchDebuggerEnabled + + Comment + Enable the texture fetching debugger if set + Persist + 1 + Type + Boolean + Value + 0 + TextureLoadFullRes Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bb6658dc48..178b96e42e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1405,12 +1405,15 @@ bool LLAppViewer::mainLoop() } //texture fetching debugger - LLFloaterTextureFetchDebugger* tex_fetch_debugger_instance = - LLFloaterReg::findTypedInstance("tex_fetch_debugger"); - if(tex_fetch_debugger_instance) + if(LLTextureFetchDebugger::isEnabled()) { - tex_fetch_debugger_instance->idle() ; - } + LLFloaterTextureFetchDebugger* tex_fetch_debugger_instance = + LLFloaterReg::findTypedInstance("tex_fetch_debugger"); + if(tex_fetch_debugger_instance) + { + tex_fetch_debugger_instance->idle() ; + } + } if ((LLStartUp::getStartupState() >= STATE_CLEANUP) && (frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD)) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 59a125dcc5..efb6ed6079 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -56,6 +56,7 @@ #include "llstartup.h" #include "llviewerstats.h" +bool LLTextureFetchDebugger::sDebuggerEnabled = false ; LLStat LLTextureFetch::sCacheHitRate("texture_cache_hits", 128); LLStat LLTextureFetch::sCacheReadLatency("texture_cache_read_latency", 128); @@ -1424,7 +1425,7 @@ bool LLTextureFetchWorker::doWork(S32 param) { if (mDecoded) { - if(!mInLocalCache) + if(mFetcher->getFetchDebugger() && !mInLocalCache) { mFetcher->getFetchDebugger()->addHistoryEntry(this); } @@ -1858,13 +1859,18 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image mHTTPTextureBits(0), mTotalHTTPRequests(0), mCurlGetRequest(NULL), - mQAMode(qa_mode) + mQAMode(qa_mode), + mFetchDebugger(NULL) { mCurlPOSTRequestCount = 0; mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), gSavedSettings.getU32("TextureLoggingThreshold")); - mFetchDebugger = new LLTextureFetchDebugger(this, cache, imagedecodethread) ; + LLTextureFetchDebugger::sDebuggerEnabled = gSavedSettings.getBOOL("TextureFetchDebuggerEnabled"); + if(LLTextureFetchDebugger::isEnabled()) + { + mFetchDebugger = new LLTextureFetchDebugger(this, cache, imagedecodethread) ; + } } LLTextureFetch::~LLTextureFetch() @@ -2311,7 +2317,11 @@ void LLTextureFetch::startThread() { // Construct mCurlGetRequest from Worker Thread mCurlGetRequest = new LLCurlRequest(); - mFetchDebugger->setCurlGetRequest(mCurlGetRequest); + + if(mFetchDebugger) + { + mFetchDebugger->setCurlGetRequest(mCurlGetRequest); + } } // WORKER THREAD @@ -2320,7 +2330,10 @@ void LLTextureFetch::endThread() // Destroy mCurlGetRequest from Worker Thread delete mCurlGetRequest; mCurlGetRequest = NULL; - mFetchDebugger->setCurlGetRequest(NULL); + if(mFetchDebugger) + { + mFetchDebugger->setCurlGetRequest(NULL); + } } // WORKER THREAD diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 3b08389042..107e1623b0 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -230,6 +230,7 @@ public: //debug use class LLTextureFetchDebugger { + friend class LLTextureFetch; public: LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextureCache* cache, LLImageDecodeThread* imagedecodethread) ; ~LLTextureFetchDebugger(); @@ -398,6 +399,11 @@ private: void unlockDecoder(); S32 fillCurlQueue(); + +private: + static bool sDebuggerEnabled; +public: + static bool isEnabled() {return sDebuggerEnabled;} }; #endif // LL_LLTEXTUREFETCH_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 986b8ac3c5..a7ca7a0836 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -228,7 +228,11 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("tex_fetch_debugger", "floater_texture_fetch_debugger.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + + if(gSavedSettings.getBOOL("TextureFetchDebuggerEnabled")) + { + LLFloaterReg::add("tex_fetch_debugger", "floater_texture_fetch_debugger.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + } LLFloaterReg::add("media_settings", "floater_media_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("message_critical", "floater_critical.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("message_tos", "floater_tos.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7bdfd6df1d..2a3ba4e603 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2286,6 +2286,14 @@ class LLDevelopSetLoggingLevel : public view_listener_t } }; +class LLDevelopTextureFetchDebugger : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return gSavedSettings.getBOOL("TextureFetchDebuggerEnabled"); + } +}; + ////////////////// // ADMIN MENU // ////////////////// @@ -8308,6 +8316,9 @@ void initialize_menus() // Develop >Set logging level view_listener_t::addMenu(new LLDevelopCheckLoggingLevel(), "Develop.CheckLoggingLevel"); view_listener_t::addMenu(new LLDevelopSetLoggingLevel(), "Develop.SetLoggingLevel"); + + //Develop (Texture Fetch Debug Console) + view_listener_t::addMenu(new LLDevelopTextureFetchDebugger(), "Develop.SetTexFetchDebugger"); // Admin >Object view_listener_t::addMenu(new LLAdminForceTakeCopy(), "Admin.ForceTakeCopy"); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 90ba21ef34..d83a595220 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -98,6 +98,8 @@ S32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA ; BOOL LLViewerTexture::sFreezeImageScalingDown = FALSE ; F32 LLViewerTexture::sCurrentTime = 0.0f ; BOOL LLViewerTexture::sUseTextureAtlas = FALSE ; +F32 LLViewerTexture::sTexelPixelRatio = 1.0f; + LLViewerTexture::EDebugTexels LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_OFF; const F32 desired_discard_bias_min = -2.0f; // -max number of levels to improve image quality by @@ -407,6 +409,7 @@ void LLViewerTextureManager::cleanup() void LLViewerTexture::initClass() { LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture() ; + sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio"); } // static @@ -723,8 +726,6 @@ void LLViewerTexture::forceImmediateUpdate() void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const { - static LLCachedControl sTexelPixelRatio(gSavedSettings,"TexelPixelRatio"); - if(needs_gltexture) { mNeedsGLTexture = TRUE ; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 95896f9d41..41bf625225 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -310,6 +310,7 @@ protected: } LLGLTextureState; LLGLTextureState mTextureState ; + static F32 sTexelPixelRatio; public: static const U32 sCurrentFileVersion; static S32 sImageCount; diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index a1f17ffc17..5d46b0f98d 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1876,14 +1876,7 @@ - - - - + - + + + + + + Date: Tue, 1 May 2012 21:29:19 -0600 Subject: fix a sculpt crash --- indra/llrender/llimagegl.cpp | 17 ++++++++++++++--- indra/llrender/llimagegl.h | 1 + indra/newview/llviewertexture.cpp | 5 +++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index bd9953e418..2c13fead97 100755 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1464,13 +1464,24 @@ void LLImageGL::destroyGLTexture() } LLImageGL::deleteTextures(1, &mTexName); + mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel. mTexName = 0; mGLTextureCreated = FALSE ; - } - mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel. + } } - +//force to invalidate the gl texture, most likely a sculpty texture +void LLImageGL::forceToInvalidateGLTexture() +{ + if (mTexName != 0) + { + destroyGLTexture(); + } + else + { + mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel. + } +} //---------------------------------------------------------------------------- diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 2060be914b..e515d6b324 100755 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -114,6 +114,7 @@ public: // Read back a raw image for this discard level, if it exists BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const; void destroyGLTexture(); + void forceToInvalidateGLTexture(); void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE); void setComponents(S8 ncomponents) { mComponents = ncomponents; } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index d83a595220..ea329f6aac 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2156,6 +2156,11 @@ void LLViewerFetchedTexture::clearFetchedResults() cleanup(); destroyGLTexture(); + + if(getDiscardLevel() >= 0) //sculpty texture, force to invalidate + { + mGLTexturep->forceToInvalidateGLTexture(); + } } void LLViewerFetchedTexture::forceToDeleteRequest() -- cgit v1.2.3 From 681c5de92bd09622de360818682240b0a17403f7 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 2 May 2012 16:48:09 -0400 Subject: SH-3128 FIX - log message cleanup for avatar rezzing --- indra/newview/app_settings/logcontrol.xml | 7 ++++--- indra/newview/llagent.cpp | 4 ++-- indra/newview/llagentwearables.cpp | 2 +- indra/newview/llappearancemgr.cpp | 34 +++++++++++++++---------------- indra/newview/llviewerinventory.cpp | 4 ++-- indra/newview/llvoavatar.cpp | 24 +++++++++++----------- indra/newview/llvoavatarself.cpp | 10 +++++---- 7 files changed, 44 insertions(+), 41 deletions(-) mode change 100644 => 100755 indra/newview/llappearancemgr.cpp mode change 100644 => 100755 indra/newview/llviewerinventory.cpp diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 81e0b5602c..64122bbb6c 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,9 +42,10 @@ tags - Avatar - - + diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index e74b7281fd..3367604753 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3786,7 +3786,7 @@ void LLAgent::sendAgentSetAppearance() } gAgentAvatarp->sendAppearanceChangeMetrics(); - LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << LL_ENDL; + LL_INFOS("Avatar") << gAgentAvatarp->avString() << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << LL_ENDL; //dumpAvatarTEs( "sendAgentSetAppearance()" ); LLMessageSystem* msg = gMessageSystem; @@ -3833,7 +3833,7 @@ void LLAgent::sendAgentSetAppearance() // only update cache entries if we have all our baked textures if (textures_current) { - LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "TAT: Sending cached texture data" << LL_ENDL; + LL_INFOS("Avatar") << gAgentAvatarp->avString() << "TAT: Sending cached texture data" << LL_ENDL; for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++) { BOOL generate_valid_hash = TRUE; diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 1aae1714f7..e441f21f90 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1645,7 +1645,7 @@ void LLAgentWearables::queryWearableCache() gAgentAvatarp->outputRezTiming("Fetching textures from cache"); } - LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "Requesting texture cache entry for " << num_queries << " baked textures" << LL_ENDL; + LL_INFOS("Avatar") << gAgentAvatarp->avString() << "Requesting texture cache entry for " << num_queries << " baked textures" << LL_ENDL; gMessageSystem->sendReliable(gAgent.getRegion()->getHost()); gAgentQueryManager.mNumPendingQueries++; gAgentQueryManager.mWearablesCacheQueryID++; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp old mode 100644 new mode 100755 index 73dd64dffe..faadfb4b87 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -162,7 +162,7 @@ public: mCatID = cat_id; mAppend = append; - LL_DEBUGS("Avatar") << self_av_string() << "starting" << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL; selfStartPhase("wear_inventory_category_callback"); } @@ -182,7 +182,7 @@ public: protected: ~LLWearInventoryCategoryCallback() { - LL_DEBUGS("Avatar") << self_av_string() << "done all inventory callbacks" << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "done all inventory callbacks" << LL_ENDL; selfStopPhase("wear_inventory_category_callback"); @@ -229,7 +229,7 @@ LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(bool update_base_outfit LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy() { - LL_DEBUGS("Avatar") << self_av_string() << "done update appearance on destroy" << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "done update appearance on destroy" << LL_ENDL; selfStopPhase("update_appearance_on_destroy"); @@ -492,7 +492,7 @@ void LLWearableHoldingPattern::onAllComplete() } // Update wearables. - LL_DEBUGS("Avatar") << self_av_string() << "Updating agent wearables with " << mResolved << " wearable items " << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "Updating agent wearables with " << mResolved << " wearable items " << LL_ENDL; LLAppearanceMgr::instance().updateAgentWearables(this, false); // Update attachments to match those requested. @@ -542,7 +542,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() if (done) { - LL_DEBUGS("Avatar") << self_av_string() << "polling, done status: " << completed << " timed out " << timed_out + LL_INFOS("Avatar") << self_av_string() << "polling, done status: " << completed << " timed out " << timed_out << " elapsed " << mWaitTime.getElapsedTimeF32() << LL_ENDL; mFired = true; @@ -696,7 +696,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable)) { // Wearable link that was never resolved; remove links to it from COF - LL_DEBUGS("Avatar") << self_av_string() << "removing link for unresolved item " << data.mItemID.asString() << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "removing link for unresolved item " << data.mItemID.asString() << LL_ENDL; LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID,false); } } @@ -716,7 +716,7 @@ bool LLWearableHoldingPattern::pollMissingWearables() if (!done) { - LL_DEBUGS("Avatar") << self_av_string() << "polling missing wearables, waiting for items " << mTypesToRecover.size() + LL_INFOS("Avatar") << self_av_string() << "polling missing wearables, waiting for items " << mTypesToRecover.size() << " links " << mTypesToLink.size() << " wearables, timed out " << timed_out << " elapsed " << mWaitTime.getElapsedTimeF32() @@ -763,7 +763,7 @@ void LLWearableHoldingPattern::handleLateArrivals() llwarns << self_av_string() << "Late arrivals not handled - in middle of missing wearables processing" << llendl; } - LL_DEBUGS("Avatar") << self_av_string() << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << LL_ENDL; // Update mFoundList using late-arriving wearables. std::set replaced_types; @@ -1450,7 +1450,7 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid, void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) { LLViewerInventoryCategory *pcat = gInventory.getCategory(category); - LL_DEBUGS("Avatar") << self_av_string() << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "starting, cat '" << (pcat ? pcat->getName() : "[UNKNOWN]") << "'" << LL_ENDL; const LLUUID cof = getCOF(); @@ -1716,7 +1716,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) BoolSetter setIsInUpdateAppearanceFromCOF(mIsInUpdateAppearanceFromCOF); - LL_DEBUGS("Avatar") << self_av_string() << "starting" << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL; //checking integrity of the COF in terms of ordering of wearables, //checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state) @@ -1892,7 +1892,7 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool gAgentWearables.notifyLoadingStarted(); - LL_DEBUGS("Avatar") << self_av_string() << "wearInventoryCategory( " << category->getName() + LL_INFOS("Avatar") << self_av_string() << "wearInventoryCategory( " << category->getName() << " )" << LL_ENDL; selfStartPhase("wear_inventory_category_fetch"); @@ -1903,7 +1903,7 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append) { - LL_DEBUGS("Avatar") << self_av_string() << "starting" << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL; selfStopPhase("wear_inventory_category_fetch"); @@ -1988,8 +1988,8 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego // wearables being dirty. if(!category) return; - LL_DEBUGS("Avatar") << self_av_string() << "wearInventoryCategoryOnAvatar( " << category->getName() - << " )" << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "wearInventoryCategoryOnAvatar '" << category->getName() + << "'" << LL_ENDL; if (gAgentCamera.cameraCustomizeAvatar()) { @@ -2002,7 +2002,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego void LLAppearanceMgr::wearOutfitByName(const std::string& name) { - LL_DEBUGS("Avatar") << self_av_string() << "Wearing category " << name << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "Wearing category " << name << LL_ENDL; //inc_busy_count(); LLInventoryModel::cat_array_t cat_array; @@ -2325,7 +2325,7 @@ const std::string OTHER_GESTURES_FOLDER = "Other Gestures"; void LLAppearanceMgr::copyLibraryGestures() { - LL_DEBUGS("Avatar") << self_av_string() << "Copying library gestures" << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "Copying library gestures" << LL_ENDL; // Copy gestures LLUUID lib_gesture_cat_id = @@ -2399,7 +2399,7 @@ void LLAppearanceMgr::autopopulateOutfits() // If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) // then auto-populate outfits from the library into the My Outfits folder. - LL_DEBUGS("Avatar") << self_av_string() << "avatar fully visible" << LL_ENDL; + LL_INFOS("Avatar") << self_av_string() << "avatar fully visible" << LL_ENDL; static bool check_populate_my_outfits = true; if (check_populate_my_outfits && diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp old mode 100644 new mode 100755 index 45ca23cdfe..b47a41c44c --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -342,8 +342,8 @@ void LLViewerInventoryItem::cloneViewerItem(LLPointer& ne void LLViewerInventoryItem::removeFromServer() { - llinfos << "Removing inventory item " << mUUID << " from server." - << llendl; + lldebugs << "Removing inventory item " << mUUID << " from server." + << llendl; LLInventoryModel::LLCategoryUpdate up(mParentUUID, -1); gInventory.accountForUpdate(up); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 275c326ef6..ffe5837249 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -786,13 +786,13 @@ std::string LLVOAvatar::avString() const void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string comment) { - LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() - << "sec ]" - << avString() - << "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32() - << " Notification " << notification_name - << " : " << comment - << llendl; + LL_INFOS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() + << "sec ]" + << avString() + << "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32() + << " Notification " << notification_name + << " : " << comment + << llendl; if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { @@ -2859,13 +2859,13 @@ void LLVOAvatar::idleUpdateLoadingEffect() { if (isFullyLoaded() && mFirstFullyVisible && isSelf()) { - LL_DEBUGS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL; + LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL; mFirstFullyVisible = FALSE; LLAppearanceMgr::instance().onFirstFullyVisible(); } if (isFullyLoaded() && mFirstFullyVisible && !isSelf()) { - LL_DEBUGS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL; + LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL; mFirstFullyVisible = FALSE; } if (isFullyLoaded()) @@ -6494,7 +6494,7 @@ void LLVOAvatar::updateRezzedStatusTimers() S32 rez_status = getRezzedStatus(); if (rez_status != mLastRezzedStatus) { - llinfos << avString() << "rez state change: " << mLastRezzedStatus << " -> " << rez_status << llendl; + LL_DEBUGS("Avatar") << avString() << "rez state change: " << mLastRezzedStatus << " -> " << rez_status << LL_ENDL; bool is_cloud_or_gray = (rez_status==0 || rez_status==1); bool was_cloud_or_gray = (mLastRezzedStatus==0 || mLastRezzedStatus==1); bool is_cloud = (rez_status==0); @@ -7180,7 +7180,7 @@ void LLVOAvatar::rebuildHUD() //----------------------------------------------------------------------------- void LLVOAvatar::onFirstTEMessageReceived() { - LL_DEBUGS("Avatar") << avString() << LL_ENDL; + LL_INFOS("Avatar") << avString() << LL_ENDL; if( !mFirstTEMessageReceived ) { mFirstTEMessageReceived = TRUE; @@ -7271,7 +7271,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived; mFirstAppearanceMessageReceived = TRUE; - LL_DEBUGS("Avatar") << avString() << "processAvatarAppearance start " << mID + LL_INFOS("Avatar") << avString() << "processAvatarAppearance start " << mID << " first? " << is_first_appearance_message << " self? " << isSelf() << LL_ENDL; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 9a77e21184..d2609e5587 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2167,12 +2167,12 @@ public: { if (isGoodStatus(status)) { - llinfos << "OK" << llendl; + LL_DEBUGS("Avatar") << "OK" << LL_ENDL; result(content); } else { - llwarns << "Failed " << status << " reason " << reason << llendl; + LL_WARNS("Avatar") << "Failed " << status << " reason " << reason << LL_ENDL; error(status,reason); } } @@ -2462,7 +2462,9 @@ void LLVOAvatarSelf::outputRezDiagnostics() const // Don't print out non-existent textures. if (j != 0) - LL_DEBUGS("Avatar") << out.str() << llendl; + { + LL_DEBUGS("Avatar") << out.str() << LL_ENDL; + } } LL_DEBUGS("Avatar") << "\t Time points for each upload (start / finish)" << llendl; for (U32 i = 0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i) @@ -2485,7 +2487,7 @@ void LLVOAvatarSelf::outputRezDiagnostics() const void LLVOAvatarSelf::outputRezTiming(const std::string& msg) const { - LL_DEBUGS("Avatar") + LL_INFOS("Avatar") << avString() << llformat("%s. Time from avatar creation: %.2f", msg.c_str(), mDebugSelfLoadTimer.getElapsedTimeF32()) << LL_ENDL; -- cgit v1.2.3