diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 6 |
3 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ba78d80ad1..7296c5d947 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8727,6 +8727,17 @@ <key>Value</key> <real>20.0</real> </map> + <key>TextureDecodeDisabled</key> + <map> + <key>Comment</key> + <string>If TRUE, do not fetch and decode any textures</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>TextureDisable</key> <map> <key>Comment</key> diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index a75f631769..eeedf38543 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -962,6 +962,15 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mState == DECODE_IMAGE) { + static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled"); + if(textures_decode_disabled) + { + // for debug use, don't decode + mState = DONE; + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); + return true; + } + if (mDesiredDiscard < 0) { // We aborted, don't decode diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index dffd654a70..b1ad01f54f 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1591,6 +1591,12 @@ void LLViewerFetchedTexture::updateVirtualSize() bool LLViewerFetchedTexture::updateFetch() { + static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled"); + if(textures_decode_disabled) + { + return false ; + } + mFetchState = 0; mFetchPriority = 0; mFetchDeltaTime = 999999.f; |