summaryrefslogtreecommitdiff
path: root/indra/newview/llflexibleobject.cpp
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-11-21 15:07:17 -0800
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-11-21 15:07:17 -0800
commitea0461c01287a2b026b5621616fb811bfc2d68a2 (patch)
treef1e94df52aa6f5a68f008278cbaec0eaca063a4a /indra/newview/llflexibleobject.cpp
parent76990fab4f3c73ab1b2051421c52444de28f9d32 (diff)
parenta830812172d7eb163c06ead3155dc4b43ded4346 (diff)
Pull and merge https://bitbucket.org/lindenlab/viewer-development.
Diffstat (limited to 'indra/newview/llflexibleobject.cpp')
-rw-r--r--indra/newview/llflexibleobject.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index ef412a6bbf..28d195d5e9 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -360,6 +360,8 @@ void LLVolumeImplFlexible::doIdleUpdate()
F32 pixel_area = mVO->getPixelArea();
U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1;
+ // MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames
+ update_period = llclamp(update_period, 0U, 32U);
if (visible)
{
@@ -431,6 +433,15 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
//the object is not visible
return ;
}
+
+ // stinson 11/12/2012: Need to check with davep on the following.
+ // Skipping the flexible update if render res is negative. If we were to continue with a negative value,
+ // the subsequent S32 num_render_sections = 1<<mRenderRes; code will specify a really large number of
+ // render sections which will then create a length exception in the std::vector::resize() method.
+ if (mRenderRes < 0)
+ {
+ return;
+ }
S32 num_sections = 1 << mSimulateRes;