Fix for SH-730: sculpted prim attachment shapes on impostored avatars load very slowly.
parent
2c2508e6c5
commit
bfa55d28bd
|
|
@ -1214,12 +1214,15 @@ void LLViewerFetchedTexture::cleanup()
|
|||
|
||||
void LLViewerFetchedTexture::setForSculpt()
|
||||
{
|
||||
static const S32 MAX_INTERVAL = 8 ; //frames
|
||||
|
||||
mForSculpt = TRUE ;
|
||||
if(isForSculptOnly() && !getBoundRecently())
|
||||
{
|
||||
destroyGLTexture() ; //sculpt image does not need gl texture.
|
||||
}
|
||||
checkCachedRawSculptImage() ;
|
||||
setMaxVirtualSizeResetInterval(MAX_INTERVAL) ;
|
||||
}
|
||||
|
||||
BOOL LLViewerFetchedTexture::isForSculptOnly() const
|
||||
|
|
|
|||
|
|
@ -671,11 +671,32 @@ void LLVOVolume::updateTextures()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLVOVolume::isVisible() const
|
||||
{
|
||||
if(mDrawable.notNull() && mDrawable->isVisible())
|
||||
{
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
if(isAttachment())
|
||||
{
|
||||
LLViewerObject* objp = (LLViewerObject*)getParent() ;
|
||||
while(objp && !objp->isAvatar())
|
||||
{
|
||||
objp = (LLViewerObject*)objp->getParent() ;
|
||||
}
|
||||
|
||||
return objp && objp->mDrawable.notNull() && objp->mDrawable->isVisible() ;
|
||||
}
|
||||
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
void LLVOVolume::updateTextureVirtualSize()
|
||||
{
|
||||
// Update the pixel area of all faces
|
||||
|
||||
if(mDrawable.isNull() || !mDrawable->isVisible())
|
||||
if(!isVisible())
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
|
@ -2745,14 +2766,7 @@ void LLVOVolume::updateRadius()
|
|||
|
||||
BOOL LLVOVolume::isAttachment() const
|
||||
{
|
||||
if (mState == 0)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return mState != 0 ;
|
||||
}
|
||||
|
||||
BOOL LLVOVolume::isHUDAttachment() const
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ public:
|
|||
void animateTextures();
|
||||
/*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
|
||||
|
||||
BOOL isVisible() const ;
|
||||
/*virtual*/ BOOL isActive() const;
|
||||
/*virtual*/ BOOL isAttachment() const;
|
||||
/*virtual*/ BOOL isRootEdit() const; // overridden for sake of attachments treating themselves as a root object
|
||||
|
|
|
|||
|
|
@ -1977,12 +1977,12 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
|
|||
|
||||
if(drawablep && !drawablep->isDead())
|
||||
{
|
||||
if (drawablep->isSpatialBridge())
|
||||
{
|
||||
if (drawablep->isSpatialBridge())
|
||||
{
|
||||
const LLDrawable* root = ((LLSpatialBridge*) drawablep)->mDrawable;
|
||||
llassert(root); // trying to catch a bad assumption
|
||||
if (root && // // this test may not be needed, see above
|
||||
root->getVObj()->isAttachment())
|
||||
root->getVObj()->isAttachment())
|
||||
{
|
||||
LLDrawable* rootparent = root->getParent();
|
||||
if (rootparent) // this IS sometimes NULL
|
||||
|
|
@ -1990,24 +1990,24 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
|
|||
LLViewerObject *vobj = rootparent->getVObj();
|
||||
llassert(vobj); // trying to catch a bad assumption
|
||||
if (vobj) // this test may not be needed, see above
|
||||
{
|
||||
{
|
||||
const LLVOAvatar* av = vobj->asAvatar();
|
||||
if (av && av->isImpostor())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue