diff options
| author | Debi King (Dessie) <dessie@lindenlab.com> | 2011-09-21 16:04:12 -0400 |
|---|---|---|
| committer | Debi King (Dessie) <dessie@lindenlab.com> | 2011-09-21 16:04:12 -0400 |
| commit | 8665dee5f6cca501ec94b33e56c0c4de284fd757 (patch) | |
| tree | 9a3356ac50a7fa084c698092596c6ba3cba59423 /indra/newview/llviewertexture.cpp | |
| parent | a66b5fb8cfc590110bb698d490510d66b6d8b430 (diff) | |
| parent | 2ae5e8db53e6d89e741cda0ce45e8cf65595bd16 (diff) | |
reconciled .hgtags
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 70509f9a9f..280337be0f 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -3109,9 +3109,16 @@ void LLViewerLODTexture::processTextureStats() { mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel) ; } + else if(LLPipeline::sMemAllocationThrottled)//release memory of large textures by decrease their resolutions. + { + if(scaleDown()) + { + mDesiredDiscardLevel = mCachedRawDiscardLevel ; + } + } } -void LLViewerLODTexture::scaleDown() +bool LLViewerLODTexture::scaleDown() { if(hasGLTexture() && mCachedRawDiscardLevel > getDiscardLevel()) { @@ -3122,7 +3129,10 @@ void LLViewerLODTexture::scaleDown() { tester->setStablizingTime() ; } + + return true ; } + return false ; } //---------------------------------------------------------------------------------------------- //end of LLViewerLODTexture |
