From 8d20480c5f77fe1fab8149d3cda79bdd61e77656 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 28 Oct 2021 18:06:21 +0000 Subject: SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton --- indra/newview/lldrawable.cpp | 41 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 495e06b6f7..502ebbd4b1 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -58,8 +58,6 @@ const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f; const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f; const F32 OBJECT_DAMPING_TIME_CONSTANT = 0.06f; -static LLTrace::BlockTimerStatHandle FTM_CULL_REBOUND("Cull Rebound"); - extern bool gShiftFrame; @@ -93,7 +91,6 @@ void LLDrawable::incrementVisible() LLDrawable::LLDrawable(LLViewerObject *vobj, bool new_entry) : LLViewerOctreeEntryData(LLViewerOctreeEntry::LLDRAWABLE), - LLTrace::MemTrackable("LLDrawable"), mVObjp(vobj) { init(new_entry); @@ -263,19 +260,13 @@ BOOL LLDrawable::isLight() const } } -static LLTrace::BlockTimerStatHandle FTM_CLEANUP_DRAWABLE("Cleanup Drawable"); -static LLTrace::BlockTimerStatHandle FTM_DEREF_DRAWABLE("Deref"); -static LLTrace::BlockTimerStatHandle FTM_DELETE_FACES("Faces"); - void LLDrawable::cleanupReferences() { - LL_RECORD_BLOCK_TIME(FTM_CLEANUP_DRAWABLE); + LL_PROFILE_ZONE_SCOPED; - { - LL_RECORD_BLOCK_TIME(FTM_DELETE_FACES); - std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); - mFaces.clear(); - } + + std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); + mFaces.clear(); gObjectList.removeDrawable(this); @@ -283,12 +274,9 @@ void LLDrawable::cleanupReferences() removeFromOctree(); - { - LL_RECORD_BLOCK_TIME(FTM_DEREF_DRAWABLE); - // Cleanup references to other objects - mVObjp = NULL; - mParent = NULL; - } + // Cleanup references to other objects + mVObjp = NULL; + mParent = NULL; } void LLDrawable::removeFromOctree() @@ -333,15 +321,12 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep) return count; } -static LLTrace::BlockTimerStatHandle FTM_ALLOCATE_FACE("Allocate Face"); - LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep) { LL_PROFILE_ZONE_SCOPED LLFace *face; { - LL_RECORD_BLOCK_TIME(FTM_ALLOCATE_FACE); face = new LLFace(this, mVObjp); } @@ -370,11 +355,8 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep) LLFace *face; - { - LL_RECORD_BLOCK_TIME(FTM_ALLOCATE_FACE); - face = new LLFace(this, mVObjp); - } - + face = new LLFace(this, mVObjp); + face->setTEOffset(mFaces.size()); face->setTexture(texturep); face->setPoolType(gPipeline.getPoolTypeFromTE(te, texturep)); @@ -1333,10 +1315,7 @@ void LLSpatialBridge::updateSpatialExtents() LLSpatialGroup* root = (LLSpatialGroup*) mOctree->getListener(0); - { - LL_RECORD_BLOCK_TIME(FTM_CULL_REBOUND); - root->rebound(); - } + root->rebound(); const LLVector4a* root_bounds = root->getBounds(); LLVector4a offset; -- cgit v1.2.3