summaryrefslogtreecommitdiff
path: root/indra/newview/llflexibleobject.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2014-02-12 10:32:02 -0800
committerRichard Linden <none@none>2014-02-12 10:32:02 -0800
commit5866bb7ef09b786f8f195770a70dc4289d183ca0 (patch)
tree0be3b5e63506bf30edd3748f9e31740ae9ebbaa8 /indra/newview/llflexibleobject.cpp
parent413be91cf5044889ade97dcbec4b17fceff122e3 (diff)
parenta8192fbf60540e42dcff5f1efb8bf8cafbfac484 (diff)
merge with release
Diffstat (limited to 'indra/newview/llflexibleobject.cpp')
-rwxr-xr-xindra/newview/llflexibleobject.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 98c0c0bf51..b64034b945 100755
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -47,8 +47,8 @@
std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList;
std::vector<S32> LLVolumeImplFlexible::sUpdateDelay;
-static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild");
-static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
+static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_REBUILD("Rebuild");
+static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
// LLFlexibleObjectData::pack/unpack now in llprimitive.cpp
@@ -334,14 +334,14 @@ void LLVolumeImplFlexible::updateRenderRes()
// updated every time step. In the future, perhaps there could be an
// optimization similar to what Havok does for objects that are stationary.
//---------------------------------------------------------------------------------
-static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies");
+static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_UPDATE("Update Flexies");
void LLVolumeImplFlexible::doIdleUpdate()
{
LLDrawable* drawablep = mVO->mDrawable;
if (drawablep)
{
- //LLFastTimer ftm(FTM_FLEXIBLE_UPDATE);
+ //LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_UPDATE);
//ensure drawable is active
drawablep->makeActive();
@@ -424,7 +424,7 @@ inline S32 log2(S32 x)
void LLVolumeImplFlexible::doFlexibleUpdate()
{
- LLFastTimer ftm(FTM_DO_FLEXIBLE_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE);
LLVolume* volume = mVO->getVolume();
LLPath *path = &volume->getPath();
if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible())
@@ -660,7 +660,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
mSection[i].mdPosition = (mSection[i].mPosition - mSection[i-1].mPosition) * inv_section_length;
// Create points
- llassert(mRenderRes > -1)
+ llassert(mRenderRes > -1);
S32 num_render_sections = 1<<mRenderRes;
if (path->getPathLength() != num_render_sections+1)
{
@@ -715,20 +715,24 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
mLastSegmentRotation = parentSegmentRotation;
}
-static LLFastTimer::DeclareTimer FTM_FLEXI_PREBUILD("Flexi Prebuild");
+static LLTrace::BlockTimerStatHandle FTM_FLEXI_PREBUILD("Flexi Prebuild");
void LLVolumeImplFlexible::preRebuild()
{
if (!mUpdated)
{
- LLFastTimer t(FTM_FLEXI_PREBUILD);
- doFlexibleRebuild();
+ LL_RECORD_BLOCK_TIME(FTM_FLEXI_PREBUILD);
+ doFlexibleRebuild(false);
}
}
-void LLVolumeImplFlexible::doFlexibleRebuild()
+void LLVolumeImplFlexible::doFlexibleRebuild(bool rebuild_volume)
{
LLVolume* volume = mVO->getVolume();
+ if(rebuild_volume)
+ {
+ volume->setDirty();
+ }
volume->regen();
mUpdated = TRUE;
@@ -780,7 +784,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
if (mRenderRes > -1)
{
- LLFastTimer t(FTM_DO_FLEXIBLE_UPDATE);
+ LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE);
doFlexibleUpdate();
}
@@ -800,8 +804,8 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME);
volume->dirtySpatialGroup();
{
- LLFastTimer t(FTM_FLEXIBLE_REBUILD);
- doFlexibleRebuild();
+ LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_REBUILD);
+ doFlexibleRebuild(volume->mVolumeChanged);
}
volume->genBBoxes(isVolumeGlobal());
}