diff options
| author | Oz Linden <oz@lindenlab.com> | 2013-06-28 13:29:11 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2013-06-28 13:29:11 -0400 |
| commit | 5f397fa58352fb58d79b72148904f925416f4978 (patch) | |
| tree | 96d35a660b4cd9227a51d7cc92f642a31ce01c23 /indra/newview/llviewerregion.cpp | |
| parent | 743b6ca6177f46d7d7f964993ee226ef6706d408 (diff) | |
NORSPEC-206: read RenderMaterialsCapability throttle rate per second from simulator
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
| -rwxr-xr-x | indra/newview/llviewerregion.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index a4f6340d9e..0f8decc643 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1944,3 +1944,35 @@ bool LLViewerRegion::dynamicPathfindingEnabled() const mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean()); } +void LLViewerRegion::resetMaterialsCapThrottle() +{ + F32 requests_per_sec = 1.0f; // original default; + if ( mSimulatorFeatures.has("RenderMaterialsCapability") + && mSimulatorFeatures["RenderMaterialsCapability"].isReal() ) + { + requests_per_sec = mSimulatorFeatures["RenderMaterialsCapability"].asReal(); + if ( requests_per_sec != 0.0f ) + { + requests_per_sec = 1.0f; + LL_WARNS("Materials") + << "region '" << getName() + << "' returned zero for RenderMaterialsCapability; using default " + << requests_per_sec << " per second" + << LL_ENDL; + } + LL_DEBUGS_ONCE("Materials") << "region '" << getName() + << "' RenderMaterialsCapability " << requests_per_sec + << LL_ENDL; + } + else + { + LL_DEBUGS("Materials") + << "region '" << getName() + << "' did not return RenderMaterialsCapability, using default " + << requests_per_sec << " per second" + << LL_ENDL; + } + + mMaterialsCapThrottleTimer.resetWithExpiry( 1.0f / requests_per_sec ); +} + |
