summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagentcamera.cpp2
-rw-r--r--indra/newview/llcontrolavatar.cpp19
-rw-r--r--indra/newview/lldrawpoolalpha.cpp2
-rw-r--r--indra/newview/lldrawpoolterrain.cpp3
-rw-r--r--indra/newview/llmeshrepository.cpp25
-rw-r--r--indra/newview/llviewerdisplay.cpp2
-rw-r--r--indra/newview/llviewerwindow.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp9
-rw-r--r--indra/newview/pipeline.cpp5
9 files changed, 31 insertions, 38 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 8eda754d4c..e7531f963b 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1931,7 +1931,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit)
}
else
{
- LLCachedControl<F32> dynamic_camera_strength(gSavedSettings, "DynamicCameraStrength");
+ static LLCachedControl<F32> dynamic_camera_strength(gSavedSettings, "DynamicCameraStrength");
target_lag = vel * dynamic_camera_strength / 30.f;
}
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 716333b217..2a52b7dde9 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -99,19 +99,11 @@ LLVOAvatar *LLControlAvatar::getAttachedAvatar()
void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_scale_fixup) const
{
- F32 max_legal_offset = MAX_LEGAL_OFFSET;
- if (gSavedSettings.getControl("AnimatedObjectsMaxLegalOffset"))
- {
- max_legal_offset = gSavedSettings.getF32("AnimatedObjectsMaxLegalOffset");
- }
- max_legal_offset = llmax(max_legal_offset,0.f);
+ static LLCachedControl<F32> anim_max_legal_offset(gSavedSettings, "AnimatedObjectsMaxLegalOffset", MAX_LEGAL_OFFSET);
+ F32 max_legal_offset = llmax(anim_max_legal_offset(), 0.f);
- F32 max_legal_size = MAX_LEGAL_SIZE;
- if (gSavedSettings.getControl("AnimatedObjectsMaxLegalSize"))
- {
- max_legal_size = gSavedSettings.getF32("AnimatedObjectsMaxLegalSize");
- }
- max_legal_size = llmax(max_legal_size, 1.f);
+ static LLCachedControl<F32> anim_max_legal_size(gSavedSettings, "AnimatedObjectsMaxLegalSize", MAX_LEGAL_SIZE);
+ F32 max_legal_size = llmax(anim_max_legal_size(), 1.f);
new_pos_fixup = LLVector3();
new_scale_fixup = 1.0f;
@@ -419,7 +411,8 @@ bool LLControlAvatar::updateCharacter(LLAgent &agent)
//virtual
void LLControlAvatar::updateDebugText()
{
- if (gSavedSettings.getBOOL("DebugAnimatedObjects"))
+ static LLCachedControl<bool> debug_animated_objects(gSavedSettings, "DebugAnimatedObjects");
+ if (debug_animated_objects)
{
S32 total_linkset_count = 0;
if (mRootVolp)
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 2d702ecf32..cb1439b403 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -208,7 +208,7 @@ void LLDrawPoolAlpha::renderPostDeferred(S32 pass)
forwardRender();
// final pass, render to depth for depth of field effects
- if (!LLPipeline::sImpostorRender && gSavedSettings.getBOOL("RenderDepthOfField") && !gCubeSnapshot && !LLPipeline::sRenderingHUDs && getType() == LLDrawPool::POOL_ALPHA_POST_WATER)
+ if (!LLPipeline::sImpostorRender && LLPipeline::RenderDepthOfField && !gCubeSnapshot && !LLPipeline::sRenderingHUDs && getType() == LLDrawPool::POOL_ALPHA_POST_WATER)
{
//update depth buffer sampler
simple_shader = fullbright_shader = &gDeferredFullbrightAlphaMaskProgram;
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index afc5cc9d4e..7d2912d81f 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -107,7 +107,8 @@ U32 LLDrawPoolTerrain::getVertexDataMask()
void LLDrawPoolTerrain::prerender()
{
- sPBRDetailMode = gSavedSettings.getS32("RenderTerrainPBRDetail");
+ static LLCachedControl<S32> render_terrain_pbr_detail(gSavedSettings, "RenderTerrainPBRDetail");
+ sPBRDetailMode = render_terrain_pbr_detail;
}
void LLDrawPoolTerrain::boostTerrainDetailTextures()
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index cd75e1c313..c02a12e6b2 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1685,9 +1685,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, bool c
file.read(buffer, bytes);
if (headerReceived(mesh_params, buffer, bytes) == MESH_OK)
{
- std::string mid;
- mesh_params.getSculptID().toString(mid);
- LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh header for ID " << mid << " - was retrieved from the cache." << LL_ENDL;
+ LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh header for ID " << mesh_params.getSculptID() << " - was retrieved from the cache." << LL_ENDL;
// Found mesh in cache
return true;
@@ -1703,9 +1701,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, bool c
if (!http_url.empty())
{
- std::string mid;
- mesh_params.getSculptID().toString(mid);
- LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh header for ID " << mid << " - was retrieved from the simulator." << LL_ENDL;
+ LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh header for ID " << mesh_params.getSculptID() << " - was retrieved from the simulator." << LL_ENDL;
//grab first 4KB if we're going to bother with a fetch. Cache will prevent future fetches if a full mesh fits
//within the first 4KB
@@ -1793,9 +1789,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
{
delete[] buffer;
- std::string mid;
- mesh_id.toString(mid);
- LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mid << " - was retrieved from the cache." << LL_ENDL;
+ LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mesh_id << " - was retrieved from the cache." << LL_ENDL;
return true;
}
@@ -1810,9 +1804,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
if (!http_url.empty())
{
- std::string mid;
- mesh_id.toString(mid);
- LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mid << " - was retrieved from the simulator." << LL_ENDL;
+ LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mesh_id << " - was retrieved from the simulator." << LL_ENDL;
LLMeshHandlerBase::ptr_t handler(new LLMeshLODHandler(mesh_params, lod, offset, size));
LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
@@ -4607,7 +4599,8 @@ F32 LLMeshRepository::getStreamingCostLegacy(LLMeshHeader& header, F32 radius, S
*unscaled_value = weighted_avg;
}
- return weighted_avg/gSavedSettings.getU32("MeshTriangleBudget")*15000.f;
+ static LLCachedControl<U32> mesh_triangle_budget(gSavedSettings, "MeshTriangleBudget");
+ return weighted_avg / mesh_triangle_budget * 15000.f;
}
LLMeshCostData::LLMeshCostData()
@@ -4758,7 +4751,8 @@ F32 LLMeshCostData::getEstTrisForStreamingCost()
F32 LLMeshCostData::getRadiusBasedStreamingCost(F32 radius)
{
- return getRadiusWeightedTris(radius)/gSavedSettings.getU32("MeshTriangleBudget")*15000.f;
+ static LLCachedControl<U32> mesh_triangle_budget(gSavedSettings, "MeshTriangleBudget");
+ return getRadiusWeightedTris(radius)/mesh_triangle_budget*15000.f;
}
F32 LLMeshCostData::getTriangleBasedStreamingCost()
@@ -5334,8 +5328,9 @@ bool LLMeshRepository::meshUploadEnabled()
bool LLMeshRepository::meshRezEnabled()
{
+ static LLCachedControl<bool> mesh_enabled(gSavedSettings, "MeshEnabled");
LLViewerRegion *region = gAgent.getRegion();
- if(gSavedSettings.getBOOL("MeshEnabled") &&
+ if(mesh_enabled &&
region)
{
return region->meshRezEnabled();
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 2ae3d016c4..fbbcf9bd84 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1596,7 +1596,7 @@ void render_ui_2d()
}
- if (gSavedSettings.getBOOL("RenderUIBuffer"))
+ if (LLPipeline::RenderUIBuffer)
{
if (LLView::sIsRectDirty)
{
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 957048566e..2869c53992 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2675,7 +2675,7 @@ void LLViewerWindow::draw()
//S32 screen_x, screen_y;
- if (!gSavedSettings.getBOOL("RenderUIBuffer"))
+ if (!LLPipeline::RenderUIBuffer)
{
LLView::sDirtyRect = getWindowRectScaled();
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index fadea01d3c..fcd2f74108 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -4070,12 +4070,14 @@ void LLVOAvatar::updateDebugText()
{
// Leave mDebugText uncleared here, in case a derived class has added some state first
- if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
+ static LLCachedControl<bool> debug_av_appearance_message(gSavedSettings, "DebugAvatarAppearanceMessage");
+ if (debug_av_appearance_message)
{
updateAppearanceMessageDebugText();
}
- if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
+ static LLCachedControl<bool> debug_av_composite_baked(gSavedSettings, "DebugAvatarCompositeBaked");
+ if (debug_av_composite_baked)
{
if (!mBakedTextureDebugText.empty())
addDebugText(mBakedTextureDebugText);
@@ -8592,7 +8594,8 @@ LLMotion* LLVOAvatar::findMotion(const LLUUID& id) const
// colorized if using deferred rendering.
void LLVOAvatar::debugColorizeSubMeshes(U32 i, const LLColor4& color)
{
- if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
+ static LLCachedControl<bool> debug_av_composite_baked(gSavedSettings, "DebugAvatarCompositeBaked");
+ if (debug_av_composite_baked)
{
avatar_joint_mesh_list_t::iterator iter = mBakedTextureDatas[i].mJointMeshes.begin();
avatar_joint_mesh_list_t::iterator end = mBakedTextureDatas[i].mJointMeshes.end();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 6cf7d9f51c..42a6987a18 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4565,7 +4565,8 @@ void LLPipeline::renderDebug()
mReflectionMapManager.renderDebug();
}
- if (gSavedSettings.getBOOL("RenderReflectionProbeVolumes") && !hud_only)
+ static LLCachedControl<bool> render_ref_probe_volumes(gSavedSettings, "RenderReflectionProbeVolumes");
+ if (render_ref_probe_volumes && !hud_only)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("probe debug display");
@@ -8960,7 +8961,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
gGL.diffuseColor4f(1, 1, 1, 1);
- S32 shadow_detail = gSavedSettings.getS32("RenderShadowDetail");
+ S32 shadow_detail = RenderShadowDetail;
// if not using VSM, disable color writes
if (shadow_detail <= 2)