diff options
author | Debi King (Dessie) <dessie@lindenlab.com> | 2011-10-16 08:32:26 -0400 |
---|---|---|
committer | Debi King (Dessie) <dessie@lindenlab.com> | 2011-10-16 08:32:26 -0400 |
commit | 4ac1b64665a49c7121411f3db27718f0c37eaf33 (patch) | |
tree | 85d7f3ccdacd6f322fb1fa213aa91c12b2d4abf4 /indra/newview/llviewertexture.cpp | |
parent | 972df2587863737eafde9caf6fce89f330358b5e (diff) | |
parent | 2f9edd050669210d651e66a86efb9746c3fa8a34 (diff) |
merge
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 |