From 029103133ebac7ee13f1af767f41b012d19a84f5 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 19 Jun 2012 18:08:39 -0500 Subject: MAINT-794 Factor out a lot of CPU overhead around updating objects. --- indra/newview/lldrawable.cpp | 47 +++++++++++--------------------------------- 1 file changed, 11 insertions(+), 36 deletions(-) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 563b9b9cab..c1f82edaaa 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -99,7 +99,6 @@ void LLDrawable::init() mPositionGroup.clear(); mExtents[0].clear(); mExtents[1].clear(); - mQuietCount = 0; mState = 0; mVObjp = NULL; @@ -407,6 +406,8 @@ void LLDrawable::makeActive() if (!isRoot() && !mParent->isActive()) { mParent->makeActive(); + //NOTE: linked set will now NEVER become static + mParent->setState(LLDrawable::ACTIVE_CHILD); } //all child objects must also be active @@ -424,14 +425,6 @@ void LLDrawable::makeActive() } } - if (mVObjp->getPCode() == LL_PCODE_VOLUME) - { - if (mVObjp->isFlexible()) - { - return; - } - } - if (mVObjp->getPCode() == LL_PCODE_VOLUME) { gPipeline.markRebuild(this, LLDrawable::REBUILD_VOLUME, TRUE); @@ -439,28 +432,22 @@ void LLDrawable::makeActive() updatePartition(); } - if (isRoot()) - { - mQuietCount = 0; - } - else - { - getParent()->mQuietCount = 0; - } + llassert(isRoot() || mParent->isActive()); } void LLDrawable::makeStatic(BOOL warning_enabled) { - if (isState(ACTIVE)) + if (isState(ACTIVE) && + !isState(ACTIVE_CHILD) && + !mVObjp->isAttachment() && + !mVObjp->isFlexible()) { clearState(ACTIVE | ANIMATED_CHILD); - if (mParent.notNull() && mParent->isActive() && warning_enabled) - { - LL_WARNS_ONCE("Drawable") << "Drawable becomes static with active parent!" << LL_ENDL; - } - + //drawable became static with active parent, not acceptable + llassert(mParent.isNull() || !mParent->isActive() || !warning_enabled); + LLViewerObject::const_child_list_t& child_list = mVObjp->getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); iter != child_list.end(); iter++) @@ -487,8 +474,8 @@ void LLDrawable::makeStatic(BOOL warning_enabled) mSpatialBridge->markDead(); setSpatialBridge(NULL); } + updatePartition(); } - updatePartition(); } // Returns "distance" between target destination and resulting xfrom @@ -792,18 +779,6 @@ void LLDrawable::updateTexture() if (getVOVolume()) { - /*if (isActive()) - { - if (isRoot()) - { - mQuietCount = 0; - } - else - { - getParent()->mQuietCount = 0; - } - }*/ - gPipeline.markRebuild(this, LLDrawable::REBUILD_MATERIAL, TRUE); } } -- cgit v1.2.3 From fd578f1136301a3b5574e213b39743635f8cff14 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 26 Jun 2012 15:44:02 -0500 Subject: MAINT-654 Potential fix for corrupt avatar bakes on some AMD systems. --- indra/newview/lldrawable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index c1f82edaaa..82ea5cd5a6 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -432,7 +432,7 @@ void LLDrawable::makeActive() updatePartition(); } - llassert(isRoot() || mParent->isActive()); + llassert(isAvatar() || isRoot() || mParent->isActive()); } -- cgit v1.2.3 From c0e2d4d988ba6d7d28bfa0487006349266e80709 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 11 Jul 2012 15:14:13 -0500 Subject: MAINT-794 Fix for assert on loading some types of objects before their parents. --- indra/newview/lldrawable.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 82ea5cd5a6..4eda2b92b3 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -625,8 +625,6 @@ BOOL LLDrawable::updateMove() return FALSE; } - makeActive(); - BOOL done; if (isState(MOVE_UNDAMPED)) @@ -635,6 +633,7 @@ BOOL LLDrawable::updateMove() } else { + makeActive(); done = updateMoveDamped(); } return done; -- cgit v1.2.3