summaryrefslogtreecommitdiff
path: root/indra/newview/llperfstats.cpp
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2024-05-06 16:52:34 +0200
committerGuru <alexandrgproductengine@lindenlab.com>2024-05-07 10:18:51 +0200
commitf9473e8afcb624cc1b101195bf15943ec372b56f (patch)
tree27a9f85fa0ca8c9dd2138a5522e7a7970a063941 /indra/newview/llperfstats.cpp
parent15d4db0b5d52097de33ea036b8a1a4b7f5384e3f (diff)
secondlife/viewer#1333 BOOL to bool conversion leftovers: ternaries
Diffstat (limited to 'indra/newview/llperfstats.cpp')
-rw-r--r--indra/newview/llperfstats.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/indra/newview/llperfstats.cpp b/indra/newview/llperfstats.cpp
index 946005b387..93851a4980 100644
--- a/indra/newview/llperfstats.cpp
+++ b/indra/newview/llperfstats.cpp
@@ -411,7 +411,7 @@ namespace LLPerfStats
return;
}
- if(belowTargetFPS == false)
+ if (!belowTargetFPS)
{
// this is the first frame under. hold fire to add a little hysteresis
belowTargetFPS = true;
@@ -488,7 +488,7 @@ namespace LLPerfStats
new_render_limit_ns = std::max((U64)new_render_limit_ns, (U64)LLPerfStats::ART_MINIMUM_NANOS);
// assign the new value
- if(renderAvatarMaxART_ns != new_render_limit_ns)
+ if (renderAvatarMaxART_ns != new_render_limit_ns)
{
renderAvatarMaxART_ns = new_render_limit_ns;
tunables.updateSettingsFromRenderCostLimit();
@@ -497,10 +497,10 @@ namespace LLPerfStats
}
// LL_DEBUGS() << "AUTO_TUNE: Target frame time:"<< LLPerfStats::raw_to_us(target_frame_time_raw) << "usecs (non_avatar is " << LLPerfStats::raw_to_us(non_avatar_time_raw) << "usecs) Max cost limited=" << renderAvatarMaxART_ns << LL_ENDL;
}
- else if(( LLPerfStats::raw_to_ns(target_frame_time_raw) > (LLPerfStats::raw_to_ns(tot_frame_time_raw) + renderAvatarMaxART_ns) ) ||
+ else if ((LLPerfStats::raw_to_ns(target_frame_time_raw) > (LLPerfStats::raw_to_ns(tot_frame_time_raw) + renderAvatarMaxART_ns)) ||
(tunables.vsyncEnabled && (target_fps == LLPerfStats::vsync_max_fps) && (target_frame_time_raw > getMeanTotalFrameTime())))
{
- if(belowTargetFPS == true)
+ if (belowTargetFPS)
{
// we reached target, force a pause
lastGlobalPrefChange = gFrameCount;
@@ -508,15 +508,17 @@ namespace LLPerfStats
}
// once we're over the FPS target we slow down further
- if((gFrameCount - lastGlobalPrefChange) > settingsChangeFrequency*3)
+ if ((gFrameCount - lastGlobalPrefChange) > settingsChangeFrequency * 3)
{
- if(!tunables.userAutoTuneLock)
+ if (!tunables.userAutoTuneLock)
{
// we've reached the target and stayed long enough to consider stable.
// turn off if we are not locked.
tunables.updateUserAutoTuneEnabled(false);
}
- if(renderAvatarMaxART_ns != 0 && LLPerfStats::tunedAvatars > 0 && (tunables.userFPSTuningStrategy != TUNE_SCENE_ONLY) )
+ if (renderAvatarMaxART_ns > 0 &&
+ LLPerfStats::tunedAvatars > 0 &&
+ tunables.userFPSTuningStrategy != TUNE_SCENE_ONLY)
{
// if we have more time to spare let's shift up little in the hope we'll restore an avatar.
U64 up_step = LLPerfStats::tunedAvatars > 2 ? LLPerfStats::ART_MIN_ADJUST_UP_NANOS : LLPerfStats::ART_MIN_ADJUST_UP_NANOS * 2;
@@ -524,15 +526,15 @@ namespace LLPerfStats
tunables.updateSettingsFromRenderCostLimit();
return;
}
- if(tunables.userFPSTuningStrategy != TUNE_AVATARS_ONLY)
+ if (tunables.userFPSTuningStrategy != TUNE_AVATARS_ONLY)
{
- if( LLPipeline::RenderFarClip < tunables.userTargetDrawDistance )
+ if (LLPipeline::RenderFarClip < tunables.userTargetDrawDistance)
{
LLPerfStats::tunables.updateFarClip( std::min(LLPipeline::RenderFarClip + DD_STEP, tunables.userTargetDrawDistance) );
LLPerfStats::lastGlobalPrefChange = gFrameCount;
return;
}
- if( (tot_frame_time_raw * 1.5) < target_frame_time_raw )
+ if ((tot_frame_time_raw * 1.5) < target_frame_time_raw)
{
// if everything else is "max" and we have >50% headroom let's knock the water quality up a notch at a time.
# if 0 // RenderReflectionDetail went away