diff options
author | Oz Linden <oz@lindenlab.com> | 2011-03-15 09:26:58 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-03-15 09:26:58 -0400 |
commit | 6faa6236f520fd1dbbbbe030957a6354f5c45db3 (patch) | |
tree | 907614751c28c888ae7f5ea725a681b34b2f48f0 /indra/newview | |
parent | 174b537953b5a39702c833ab1e83313a80e5e549 (diff) | |
parent | ae3e97024ec60d2c0555bf01ff6e2786232b6dd5 (diff) |
merge changes for storm-28
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llchathistory.cpp | 43 | ||||
-rw-r--r-- | indra/newview/llchathistory.h | 2 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 1 | ||||
-rw-r--r-- | indra/newview/lltexturecache.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewertexture.h | 2 | ||||
-rw-r--r-- | indra/newview/llvocache.cpp | 6 | ||||
-rw-r--r-- | indra/newview/viewer_manifest.py | 2 |
10 files changed, 54 insertions, 29 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a23f809b71..327a5ad698 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1677,8 +1677,8 @@ bool LLAppViewer::cleanup() // Delete workers first // shotdown all worker threads before deleting them in case of co-dependencies - sTextureCache->shutdown(); sTextureFetch->shutdown(); + sTextureCache->shutdown(); sImageDecodeThread->shutdown(); sTextureFetch->shutDownTextureCacheThread() ; diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 5ff22f89ab..d4ec377e03 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -138,10 +138,7 @@ public: if (level == "profile") { - LLSD params; - params["object_id"] = getAvatarId(); - - LLFloaterReg::showInstance("inspect_object", params); + LLFloaterReg::showInstance("inspect_remote_object", mObjectData); } else if (level == "block") { @@ -229,7 +226,7 @@ public: if (mSourceType == CHAT_SOURCE_OBJECT) { - LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", mAvatarID)); + LLFloaterReg::showInstance("inspect_remote_object", mObjectData); } else if (mSourceType == CHAT_SOURCE_AGENT) { @@ -251,7 +248,7 @@ public: const LLUUID& getAvatarId () const { return mAvatarID;} - void setup(const LLChat& chat,const LLStyle::Params& style_params) + void setup(const LLChat& chat, const LLStyle::Params& style_params, const LLSD& args) { mAvatarID = chat.mFromID; mSessionID = chat.mSessionID; @@ -332,7 +329,8 @@ public: setTimeField(chat); - + + // Set up the icon. LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon"); if(mSourceType != CHAT_SOURCE_AGENT || mAvatarID.isNull()) @@ -352,6 +350,30 @@ public: case CHAT_SOURCE_UNKNOWN: icon->setValue(LLSD("Unknown_Icon")); } + + // In case the message came from an object, save the object info + // to be able properly show its profile. + if ( chat.mSourceType == CHAT_SOURCE_OBJECT) + { + std::string slurl = args["slurl"].asString(); + if (slurl.empty()) + { + LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); + if(region) + { + LLSLURL region_slurl(region->getName(), chat.mPosAgent); + slurl = region_slurl.getLocationString(); + } + } + + LLSD payload; + payload["object_id"] = chat.mFromID; + payload["name"] = chat.mFromName; + payload["owner_id"] = chat.mOwnerID; + payload["slurl"] = LLWeb::escapeURL(slurl); + + mObjectData = payload; + } } /*virtual*/ void draw() @@ -540,6 +562,7 @@ protected: static LLUICtrl* sInfoCtrl; LLUUID mAvatarID; + LLSD mObjectData; EChatSourceType mSourceType; std::string mFrom; LLUUID mSessionID; @@ -649,10 +672,10 @@ LLView* LLChatHistory::getSeparator() return separator; } -LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style_params) +LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style_params, const LLSD& args) { LLChatHistoryHeader* header = LLChatHistoryHeader::createInstance(mMessageHeaderFilename); - header->setup(chat,style_params); + header->setup(chat, style_params, args); return header; } @@ -834,7 +857,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL } else { - view = getHeader(chat, style_params); + view = getHeader(chat, style_params, args); if (mEditor->getText().size() == 0) p.top_pad = 0; else diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index ac48d7bf29..28344e6a10 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -94,7 +94,7 @@ class LLChatHistory : public LLUICtrl * Builds a message header. * @return pointer to LLView header object. */ - LLView* getHeader(const LLChat& chat,const LLStyle::Params& style_params); + LLView* getHeader(const LLChat& chat,const LLStyle::Params& style_params, const LLSD& args); void onClickMoreText(); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 0eac7d5e2a..f8f9f3ab86 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -775,6 +775,7 @@ bool idle_startup() gViewerWindow->setNormalControlsVisible( FALSE ); gLoginMenuBarView->setVisible( TRUE ); gLoginMenuBarView->setEnabled( TRUE ); + show_debug_menus(); // Hide the splash screen LLSplashScreen::hide(); diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index f54214b95c..7fb52c1939 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1419,22 +1419,21 @@ void LLTextureCache::readHeaderCache() } } } - if (num_entries > sCacheMaxEntries) + if (num_entries - empty_entries > sCacheMaxEntries) { // Special case: cache size was reduced, need to remove entries // Note: After we prune entries, we will call this again and create the LRU - U32 entries_to_purge = (num_entries-empty_entries) - sCacheMaxEntries; + U32 entries_to_purge = (num_entries - empty_entries) - sCacheMaxEntries; llinfos << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << llendl; - if (entries_to_purge > 0) + // We can exit the following loop with the given condition, since if we'd reach the end of the lru set we'd have: + // purge_list.size() = lru.size() = num_entries - empty_entries = entries_to_purge + sCacheMaxEntries >= entries_to_purge + // So, it's certain that iter will never reach lru.end() first. + std::set<lru_data_t>::iterator iter = lru.begin(); + while (purge_list.size() < entries_to_purge) { - for (std::set<lru_data_t>::iterator iter = lru.begin(); iter != lru.end(); ++iter) - { - purge_list.insert(iter->second); - if (purge_list.size() >= entries_to_purge) - break; - } + purge_list.insert(iter->second); + ++iter; } - llassert_always(purge_list.size() >= entries_to_purge); } else { diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 81479e8b49..979d91cfcb 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1180,6 +1180,7 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp) } } + void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" ); @@ -1199,7 +1200,6 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { LLViewerObject* objectp = *iter; - //llassert_always(!objectp->isDead()); if(objectp->isDead())//some dead objects somehow not cleaned. { continue ; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index cd16b15e3e..cf7f3f80ad 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2691,12 +2691,10 @@ void LLViewerFetchedTexture::saveRawImage() mLastReferencedSavedRawImageTime = sCurrentTime ; } -void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard, bool from_callback) +void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard) { if(!mForceToSaveRawImage || mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard) { - llassert_always(from_callback || mBoostLevel == LLViewerTexture::BOOST_PREVIEW) ; - mForceToSaveRawImage = TRUE ; mDesiredSavedRawDiscardLevel = desired_discard ; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index b5636bbdc7..d512f8ec3a 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -465,7 +465,7 @@ public: S32 getCachedRawImageLevel() const {return mCachedRawDiscardLevel;} BOOL isCachedRawImageReady() const {return mCachedRawImageReady ;} BOOL isRawImageValid()const { return mIsRawImageValid ; } - void forceToSaveRawImage(S32 desired_discard = 0, bool from_callback = false) ; + void forceToSaveRawImage(S32 desired_discard = 0) ; /*virtual*/ void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ; void destroySavedRawImage() ; LLImageRaw* getSavedRawImage() ; diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index a933500706..b888a263d0 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -71,6 +71,7 @@ LLVOCacheEntry::LLVOCacheEntry() } LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) + : mBuffer(NULL) { S32 size = -1; BOOL success; @@ -135,7 +136,10 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) LLVOCacheEntry::~LLVOCacheEntry() { - delete [] mBuffer; + if(mBuffer) + { + delete[] mBuffer; + } } diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1722c84d34..4c4b90855c 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -803,7 +803,7 @@ class DarwinManifest(ViewerManifest): self.run_command('SetFile -a V %r' % pathname) # Create the alias file (which is a resource file) from the .r - self.run_command('rez %r -o %r' % + self.run_command('Rez %r -o %r' % (self.src_path_of("installers/darwin/release-dmg/Applications-alias.r"), os.path.join(volpath, "Applications"))) |