diff options
| author | simon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com> | 2012-12-04 14:31:15 -0800 |
|---|---|---|
| committer | simon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com> | 2012-12-04 14:31:15 -0800 |
| commit | 40e78a80cc293874216cdc8730d93cba8e987052 (patch) | |
| tree | 1d16ec375ef2b0dfd9c7a3363cd46575c457a033 /indra/newview/llflexibleobject.cpp | |
| parent | 18e20ca6f2cb7d51d4d7e7d9566b0018025a91cc (diff) | |
| parent | f5a47417fde70f78b99744386c6da0bcf78e60d5 (diff) | |
Pull and merge viewer-development
Diffstat (limited to 'indra/newview/llflexibleobject.cpp')
| -rw-r--r-- | indra/newview/llflexibleobject.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index ade469e50d..77a0cdffce 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -361,6 +361,8 @@ void LLVolumeImplFlexible::doIdleUpdate() F32 pixel_area = mVO->getPixelArea(); U32 update_period = (U32) (llmax((S32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f))),0)+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) { @@ -432,6 +434,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; |
