diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 1 | ||||
-rw-r--r-- | indra/newview/lltexturecache.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 56 | ||||
-rw-r--r-- | indra/newview/llviewerobjectlist.h | 4 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewertexture.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llvocache.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llworld.cpp | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_places.xml | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 9 | ||||
-rw-r--r-- | indra/newview/viewer_manifest.py | 2 |
13 files changed, 100 insertions, 36 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d0e1a454fa..10b222751b 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/llstartup.cpp b/indra/newview/llstartup.cpp index 7ced909dd3..b2e0c81b73 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -773,6 +773,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 80d8c8e332..da95bacc41 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -881,13 +881,14 @@ void LLViewerObjectList::clearDebugText() void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) { LLMemType mt(LLMemType::MTYPE_OBJECT); - if (mDeadObjects.count(objectp->mID)) + if (mDeadObjects.find(objectp->mID) != mDeadObjects.end()) { - llinfos << "Object " << objectp->mID << " already on dead list, ignoring cleanup!" << llendl; - return; + llinfos << "Object " << objectp->mID << " already on dead list!" << llendl; + } + else + { + mDeadObjects.insert(objectp->mID); } - - mDeadObjects.insert(std::pair<LLUUID, LLPointer<LLViewerObject> >(objectp->mID, objectp)); // Cleanup any references we have to this object // Remove from object map so noone can look it up. @@ -1137,6 +1138,46 @@ bool LLViewerObjectList::hasMapObjectInRegion(LLViewerRegion* regionp) return false ; } +//make sure the region is cleaned up. +void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp) +{ + std::set<LLViewerObject*> dead_object_list ; + std::set<LLViewerObject*> region_object_list ; + for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter) + { + LLViewerObject* objectp = *iter; + + if(objectp->isDead()) + { + dead_object_list.insert(objectp) ; + } + else if(objectp->getRegion() == regionp) + { + region_object_list.insert(objectp) ; + } + } + + if(dead_object_list.size() > 0) + { + llwarns << "There are " << dead_object_list.size() << " dead objects on the map!" << llendl ; + + for(std::set<LLViewerObject*>::iterator iter = dead_object_list.begin(); iter != dead_object_list.end(); ++iter) + { + cleanupReferences(*iter) ; + } + } + if(region_object_list.size() > 0) + { + llwarns << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << llendl ; + + for(std::set<LLViewerObject*>::iterator iter = region_object_list.begin(); iter != region_object_list.end(); ++iter) + { + (*iter)->markDead() ; + } + } +} + + void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" ); @@ -1156,7 +1197,10 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { LLViewerObject* objectp = *iter; - llassert_always(!objectp->isDead()); + if(objectp->isDead())//some dead objects somehow not cleaned. + { + continue ; + } if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment()) { diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 8cff8e988a..22a7f97c38 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -88,6 +88,7 @@ public: void shiftObjects(const LLVector3 &offset); bool hasMapObjectInRegion(LLViewerRegion* regionp) ; + void clearAllMapObjectsInRegion(LLViewerRegion* regionp) ; void renderObjectsForMap(LLNetMap &netmap); void renderObjectBounds(const LLVector3 ¢er); @@ -181,8 +182,7 @@ protected: vobj_list_t mMapObjects; - typedef std::map<LLUUID, LLPointer<LLViewerObject> > vo_map; - vo_map mDeadObjects; // Need to keep multiple entries per UUID + std::set<LLUUID> mDeadObjects; std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 16e73da79b..cc635f71f9 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2689,12 +2689,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/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a5218786d8..2dddce31da 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -316,6 +316,14 @@ public: std::string rwind_vector_text; std::string audio_text; + static const std::string beacon_particle = LLTrans::getString("BeaconParticle"); + static const std::string beacon_physical = LLTrans::getString("BeaconPhysical"); + static const std::string beacon_scripted = LLTrans::getString("BeaconScripted"); + static const std::string beacon_scripted_touch = LLTrans::getString("BeaconScriptedTouch"); + static const std::string beacon_sound = LLTrans::getString("BeaconSound"); + static const std::string beacon_media = LLTrans::getString("BeaconMedia"); + static const std::string particle_hiding = LLTrans::getString("ParticleHiding"); + // Draw the statistics in a light gray // and in a thin font mTextColor = LLColor4( 0.86f, 0.86f, 0.86f, 1.f ); @@ -566,33 +574,33 @@ public: { if (LLPipeline::getRenderParticleBeacons(NULL)) { - addText(xpos, ypos, "Viewing particle beacons (blue)"); + addText(xpos, ypos, beacon_particle); ypos += y_inc; } if (LLPipeline::toggleRenderTypeControlNegated((void*)LLPipeline::RENDER_TYPE_PARTICLES)) { - addText(xpos, ypos, "Hiding particles"); + addText(xpos, ypos, particle_hiding); ypos += y_inc; } if (LLPipeline::getRenderPhysicalBeacons(NULL)) { - addText(xpos, ypos, "Viewing physical object beacons (green)"); + addText(xpos, ypos, beacon_physical); ypos += y_inc; } if (LLPipeline::getRenderScriptedBeacons(NULL)) { - addText(xpos, ypos, "Viewing scripted object beacons (red)"); + addText(xpos, ypos, beacon_scripted); ypos += y_inc; } else if (LLPipeline::getRenderScriptedTouchBeacons(NULL)) { - addText(xpos, ypos, "Viewing scripted object with touch function beacons (red)"); + addText(xpos, ypos, beacon_scripted_touch); ypos += y_inc; } if (LLPipeline::getRenderSoundBeacons(NULL)) { - addText(xpos, ypos, "Viewing sound beacons (yellow)"); + addText(xpos, ypos, beacon_sound); ypos += y_inc; } } 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/llworld.cpp b/indra/newview/llworld.cpp index c09cafc1eb..c6f9b6f6e4 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -277,7 +277,9 @@ void LLWorld::removeRegion(const LLHost &host) updateWaterObjects(); - llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ; + //double check all objects of this region are removed. + gObjectList.clearAllMapObjectsInRegion(regionp) ; + //llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ; } diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index f423dbb91c..daf571297f 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -214,10 +214,9 @@ background_visible="true" <menu_button follows="bottom|left|right" height="23" - image_disabled="ComboButton_Off" - image_unselected="ComboButton_Off" - image_pressed="ComboButton_Off" - image_pressed_selected="ComboButton_Off" + image_disabled="ComboButton_UpOff" + image_unselected="ComboButton_UpOff" + image_selected="ComboButton_UpSelected" layout="topleft" mouse_opaque="false" name="overflow_btn" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index c0d5f93f83..d0625d9755 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3426,4 +3426,13 @@ Abuse Report</string> <string name="Z">Z</string> <!-- Key names end --> + <!-- llviewerwindow --> + <string name="BeaconParticle">Viewing particle beacons (blue)</string> + <string name="BeaconPhysical">Viewing physical object beacons (green)</string> + <string name="BeaconScripted">Viewing scripted object beacons (red)</string> + <string name="BeaconScriptedTouch">Viewing scripted object with touch function beacons (red)</string> + <string name="BeaconSound">Viewing sound beacons (yellow)</string> + <string name="BeaconMedia">Viewing media beacons (white)</string> + <string name="ParticleHiding">Hiding Particles</string> + </strings> 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"))) |