diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-09-09 11:58:52 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-09-09 11:58:52 -0600 |
commit | a9d22b0f585cc90ba1bb94a68cc4175b3019b062 (patch) | |
tree | d7b7e7b8e3048258d003851e225ae9e4bc51f8c0 /indra | |
parent | 1f9e73bbdb9c20de26f42bc33ed9c19457d43df7 (diff) |
some fix for SH-4416: Interesting: memory footprint is larger when loading from cache while ObjectCacheViewCullingEnabled is enabled than when it's disabled.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 12 | ||||
-rwxr-xr-x | indra/newview/llvocache.cpp | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 9c038d54d5..7cc4195a3d 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1207,12 +1207,7 @@ BOOL LLViewerRegion::idleUpdate(F32 max_update_time) max_update_time -= update_timer.getElapsedTimeF32(); - if(gViewerWindow->getProgressView()->getVisible()) - { - //in case rendering pipeline is not started yet. - mImpl->mVOCachePartition->cull(*(LLViewerCamera::getInstance()), false); - } - else if(max_update_time < 0.f) + if(max_update_time < 0.f && !gViewerWindow->getProgressView()->getVisible()) { return did_update; } @@ -1279,7 +1274,8 @@ F32 LLViewerRegion::killInvisibleObjects(F32 max_time) return max_time; } - size_t max_update = sNewObjectCreationThrottle < 0 ? mImpl->mActiveSet.size() : 64; + bool unstable = sNewObjectCreationThrottle < 0; + size_t max_update = unstable ? mImpl->mActiveSet.size() : 64; if(!mInvisibilityCheckHistory && isViewerCameraStatic()) { //history is clean, reduce number of checking @@ -1299,7 +1295,7 @@ F32 LLViewerRegion::killInvisibleObjects(F32 max_time) iter = mImpl->mActiveSet.begin(); } - if(!(*iter)->isRecentlyVisible() && (*iter)->mLastCameraUpdated < sLastCameraUpdated) + if(!(*iter)->isRecentlyVisible() && (unstable || (*iter)->mLastCameraUpdated < sLastCameraUpdated)) { killObject((*iter), delete_list); } diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 1cfda038a8..35af99cd42 100755 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -636,6 +636,11 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion) return 0; } + if(LLViewerCamera::sCurCameraID >= LLViewerCamera::CAMERA_WATER0) + { + return 0; //no need for those cameras. + } + if(mCulledTime[LLViewerCamera::sCurCameraID] == LLViewerOctreeEntryData::getCurrentFrame()) { return 0; //already culled |