diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index 0207e749e..415f872b6 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -61,17 +61,13 @@ BOOL LLMemory::sEnableMemoryFailurePrevention = FALSE; LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sMemAllocationTracker; #endif -void ll_assert_aligned_func(uintptr_t ptr,U32 alignment) -{ #ifdef SHOW_ASSERT +void singu_alignment_check_failed(void) +{ // Redundant, place to set breakpoints. - if (ptr%alignment!=0) - { - llwarns << "alignment check failed" << llendl; - } - llassert(ptr%alignment==0); -#endif + llassert(false); } +#endif //static void LLMemory::initClass() diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 50739b677..48cd2b7b2 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -42,10 +42,32 @@ class LLMutex ; #define LL_CHECK_MEMORY #endif -LL_COMMON_API void ll_assert_aligned_func(uintptr_t ptr,U32 alignment); - +// +// ll_assert_aligned seems to only exist to set breakpoints in case an alignment check fails. +// However, the implementation was horrible: the test was done using a integer modulo after +// calling a function; which is like 500 times slower then the below. That turned out to be +// significant compared to CPU cycles used to do vector calculations in side of which this test +// is used. +// +// This implementation uses a faster, inlined test, and then still calls a function when +// that fails to set a break point there if needed. +// +// This uses the fact that 'alignment' is literal int (aka, '16' or '64') that is a power of two. +// As a result, the modulo is converted by the compiler to a logical AND with alignment-1, what +// it cannot do if you don't inline the test. #ifdef SHOW_ASSERT -#define ll_assert_aligned(ptr,alignment) ll_assert_aligned_func(reinterpret_cast(ptr),((U32)alignment)) +LL_COMMON_API void singu_alignment_check_failed(void); + +#define ll_assert_aligned(ptr,alignment) \ + do \ + { \ + if (LL_UNLIKELY(reinterpret_cast(ptr) % alignment)) \ + { \ + singu_alignment_check_failed(); \ + } \ + } \ + while(0) +// #else #define ll_assert_aligned(ptr,alignment) #endif diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index deebb57e9..27df264af 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1963,6 +1963,8 @@ void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory child->getAttributeString("type", type); child->getAttributeString("name", item_name); child->getAttributeString("label", source_label); + + LLStringUtil::format(source_label, LLTrans::getDefaultArgs()); // parse jump key out of label typedef boost::tokenizer > tokenizer; @@ -2303,6 +2305,8 @@ LLView* LLMenuGL::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *fa std::string label = name; node->getAttributeString("label", label); + LLStringUtil::format(label, LLTrans::getDefaultArgs()); + // parse jump key out of label std::string new_menu_label; diff --git a/indra/newview/llhoverview.cpp b/indra/newview/llhoverview.cpp index dd53f11d6..e35848d78 100644 --- a/indra/newview/llhoverview.cpp +++ b/indra/newview/llhoverview.cpp @@ -88,6 +88,7 @@ // const char* DEFAULT_DESC = "(No Description)"; const F32 DELAY_BEFORE_SHOW_TIP = 0.35f; +const F32 DELAY_BEFORE_REFRESH_TIP = 0.50f; // // Local globals @@ -113,6 +114,9 @@ LLHoverView::LLHoverView(const std::string& name, const LLRect& rect) mUseHover = TRUE; mTyping = FALSE; mHoverOffset.clearVec(); + // + mLastTextHoverObject = NULL; + // } LLHoverView::~LLHoverView() @@ -139,6 +143,9 @@ void LLHoverView::updateHover(LLTool* current_tool) mStartHoverPickTimer = TRUE; // Clear the existing text so that we do not briefly show the wrong data. mText.clear(); + // + mLastTextHoverObject = NULL; + // } if (mDoneHoverPick) @@ -222,6 +229,18 @@ void LLHoverView::updateText() LLViewerObject* hit_object = getLastHoverObject(); std::string line; + // + if (hit_object == mLastTextHoverObject && + !(mLastTextHoverObjectTimer.getStarted() && mLastTextHoverObjectTimer.hasExpired())) + { + // mText is already up to date. + return; + } + mLastTextHoverObject = hit_object; + mLastTextHoverObjectTimer.stop(); + bool retrieving_data = false; + // + mText.clear(); if ( hit_object ) { @@ -403,6 +422,7 @@ void LLHoverView::updateText() else { line.append(LLTrans::getString("RetrievingData")); + retrieving_data = true; } } else @@ -417,12 +437,14 @@ void LLHoverView::updateText() else { line.append(LLTrans::getString("RetrievingData")); + retrieving_data = true; } } } else { line.append(LLTrans::getString("RetrievingData")); + retrieving_data = true; } mText.push_back(line); @@ -514,6 +536,7 @@ void LLHoverView::updateText() { LLStringUtil::format_map_t args; args["[MESSAGE]"] = LLTrans::getString("RetrievingData"); + retrieving_data = true; line.append(LLTrans::getString("TooltipForSaleMsg", args)); } mText.push_back(line); @@ -604,6 +627,7 @@ void LLHoverView::updateText() else { line.append(LLTrans::getString("RetrievingData")); + retrieving_data = true; } } else if(gCacheName->getFullName(owner, name)) @@ -616,11 +640,13 @@ void LLHoverView::updateText() else { line.append(LLTrans::getString("RetrievingData")); + retrieving_data = true; } } else { line.append(LLTrans::getString("RetrievingData")); + retrieving_data = true; } mText.push_back(line); @@ -699,8 +725,15 @@ void LLHoverView::updateText() mText.push_back(line); } } -} + // + if (retrieving_data) + { + // Keep doing this twice per second, until all data was retrieved. + mLastTextHoverObjectTimer.start(DELAY_BEFORE_REFRESH_TIP); + } + // +} void LLHoverView::draw() { diff --git a/indra/newview/llhoverview.h b/indra/newview/llhoverview.h index d0bb28d83..76f491fbb 100644 --- a/indra/newview/llhoverview.h +++ b/indra/newview/llhoverview.h @@ -105,6 +105,8 @@ protected: // If not null and not dead, we're over an object. LLPointer mLastHoverObject; + LLViewerObject* mLastTextHoverObject; // Singu extension: the value of mLastHoverObject that corresponds to mText. + LLFrameTimer mLastTextHoverObjectTimer; // Singu extension: times how long ago the text was updated (while retrieving data). LLPickInfo mLastPickInfo; // If not LLVector3d::ZERO, we're over land. diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 04162ae42..efdafd28e 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -487,8 +487,8 @@ BOOL LLFloaterIMPanel::postBuild() if (LLUICtrl* ctrl = findChild("history_btn")) ctrl->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickHistory, this)); - getChild("start_call_btn")->setCommitCallback(boost::bind(&LLIMMgr::startCall, gIMMgr, mSessionUUID, LLVoiceChannel::OUTGOING_CALL)); - getChild("end_call_btn")->setCommitCallback(boost::bind(&LLIMMgr::endCall, gIMMgr, mSessionUUID)); + getChild("start_call_btn")->setCommitCallback(boost::bind(&LLIMMgr::startCall, gIMMgr, boost::ref(mSessionUUID), LLVoiceChannel::OUTGOING_CALL)); + getChild("end_call_btn")->setCommitCallback(boost::bind(&LLIMMgr::endCall, gIMMgr, boost::ref(mSessionUUID))); getChild("send_btn")->setCommitCallback(boost::bind(&LLFloaterIMPanel::onSendMsg,this)); if (LLButton* btn = findChild("toggle_active_speakers_btn")) btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickToggleActiveSpeakers, this, _2)); @@ -506,7 +506,7 @@ BOOL LLFloaterIMPanel::postBuild() mSpeakerPanel->refreshSpeakers(); } - if (mDialog == IM_NOTHING_SPECIAL) + if (mSessionType == P2P_SESSION) { getChild("mute_btn")->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickMuteVoice, this)); getChild("speaker_volume")->setCommitCallback(boost::bind(&LLVoiceClient::setUserVolume, LLVoiceClient::getInstance(), mOtherParticipantUUID, _2)); @@ -1145,7 +1145,7 @@ bool convert_roleplay_text(std::string& text); // Returns true if text is an act void LLFloaterIMPanel::onSendMsg() { if (!gAgent.isGodlike() - && (mDialog == IM_NOTHING_SPECIAL) + && (mSessionType == P2P_SESSION) && mOtherParticipantUUID.isNull()) { llinfos << "Cannot send IM to everyone unless you're a god." << llendl; @@ -1258,7 +1258,7 @@ void LLFloaterIMPanel::onSendMsg() } // local echo - if((mDialog == IM_NOTHING_SPECIAL) && + if((mSessionType == P2P_SESSION) && (mOtherParticipantUUID.notNull())) { std::string name; @@ -1390,7 +1390,7 @@ void LLFloaterIMPanel::sendTypingState(bool typing) return; // Don't want to send typing indicators to multiple people, potentially too // much network traffic. Only send in person-to-person IMs. - if (mDialog != IM_NOTHING_SPECIAL) return; + if (mSessionType == P2P_SESSION) return; std::string name; gAgent.buildFullname(name); diff --git a/indra/newview/skins/default/xui/de/floater_about.xml b/indra/newview/skins/default/xui/de/floater_about.xml index 75e60e0a3..188c19b15 100644 --- a/indra/newview/skins/default/xui/de/floater_about.xml +++ b/indra/newview/skins/default/xui/de/floater_about.xml @@ -2,13 +2,10 @@ -