diff options
| author | Dave Parks <davep@lindenlab.com> | 2010-04-20 11:38:38 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2010-04-20 11:38:38 -0500 | 
| commit | 9780fa7cde008d62664cb2d5cec0b050b9ad5036 (patch) | |
| tree | bcfc81d4958dc0cf04aa97e5281c083669feb17a | |
| parent | 873ed0febff3f9d3a9c877dec7fa147fadb5f090 (diff) | |
Better branch prediction for markVisible.
(transplanted from 5b6c80049d6e6c0df2396099b865729f21200de8)
| -rw-r--r-- | indra/newview/pipeline.cpp | 36 | 
1 files changed, 17 insertions, 19 deletions
| diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index a45f41a7dd..620f34ae53 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1960,31 +1960,29 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)  {  	LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_VISIBLE); -	if(!drawablep || drawablep->isDead()) +	if(drawablep && !drawablep->isDead())  	{ -		return; -	} -	 -	if (drawablep->isSpatialBridge()) -	{ -		LLDrawable* root = ((LLSpatialBridge*) drawablep)->mDrawable; - -		if (root && root->getParent() && root->getVObj() && root->getVObj()->isAttachment()) +		if (drawablep->isSpatialBridge())  		{ -			LLVOAvatar* av = root->getParent()->getVObj()->asAvatar(); -			if (av && av->isImpostor()) +			LLDrawable* root = ((LLSpatialBridge*) drawablep)->mDrawable; + +			if (root->getVObj()->isAttachment())  			{ -				return; +				LLVOAvatar* av = root->getParent()->getVObj()->asAvatar(); +				if (av && av->isImpostor()) +				{ +					return; +				}  			} +			sCull->pushBridge((LLSpatialBridge*) drawablep); +		} +		else +		{ +			sCull->pushDrawable(drawablep);  		} -		sCull->pushBridge((LLSpatialBridge*) drawablep); -	} -	else -	{ -		sCull->pushDrawable(drawablep); -	} -	drawablep->setVisible(camera); +		drawablep->setVisible(camera); +	}  }  void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) | 
