diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2024-10-03 18:25:37 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2024-10-03 18:25:37 -0700 |
commit | de95bd3187b61ca1152c14bc9bd112da61027d4c (patch) | |
tree | 0f76dfa9c33153beee71cd10da49114f321eb81c | |
parent | 322b4fb9c4c37787bd219dd97012f121309d591a (diff) |
secondlife/viewer#2472: Also don't persist local file enumeration beyond next session
-rw-r--r-- | indra/llrender/llgl.cpp | 1 | ||||
-rw-r--r-- | indra/llrender/llgl.h | 1 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 4 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 3 |
5 files changed, 13 insertions, 4 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 15fb289de3..a60f1efbdf 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -65,6 +65,7 @@ bool gDebugSession = false; bool gDebugGLSession = false; +bool gDebugTextureLabelLocalFilesSession = false; bool gClothRipple = false; bool gHeadlessClient = false; bool gNonInteractive = false; diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index f5b1e8d786..8d7ac56d79 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -48,6 +48,7 @@ extern bool gDebugGL; extern bool gDebugSession; extern bool gDebugGLSession; +extern bool gDebugTextureLabelLocalFilesSession; extern llofstream gFailLog; #define LL_GL_ERRS LL_ERRS("RenderState") diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4d0cffa2a9..cb32789cad 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7943,10 +7943,10 @@ <key>Value</key> <integer>0</integer> </map> - <key>RenderDebugTextureLabelLocalFiles</key> + <key>RenderDebugTextureLabelLocalFilesSession</key> <map> <key>Comment</key> - <string>Enumerate textures with local file names. Doesn't do anything until RenderDebugTextureLabel is set to true. Requires restart.</string> + <string>Enumerate textures with local file names. Doesn't do anything until RenderDebugTextureLabel is set to true. Requires restart AND applies on the next session only.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 521e6eee1a..7fc97558f1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2860,6 +2860,14 @@ bool LLAppViewer::initConfiguration() gSavedSettings.setBOOL("RenderDebugGLSession", false); } + if (gSavedSettings.getBOOL("RenderDebugTextureLabelLocalFilesSession")) + { + gDebugTextureLabelLocalFilesSession = true; + // Texture label accounting for local files takes up memory in the + // background, so don't persist. + gSavedSettings.setBOOL("RenderDebugTextureLabelLocalFilesSession", false); + } + const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); if (skinfolder && LLStringUtil::null != skinfolder->getValue().asString()) { diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 4c13105d5d..752cfb3884 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -447,8 +447,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& std::string url = "file://" + full_path; LLViewerFetchedTexture* tex = getImageFromUrl(url, f_type, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id); - static LLCachedControl<bool> debug_texture_label(gSavedSettings, "RenderDebugTextureLabelLocalFiles", false); - if (debug_texture_label()) + if (gDebugTextureLabelLocalFilesSession) { gTextureList.mNameTextureList.push_back(LLViewerTextureList::NameElement(tex, filename)); } |