diff options
author | Paul ProductEngine <pguslisty@productengine.com> | 2011-09-07 18:46:51 +0300 |
---|---|---|
committer | Paul ProductEngine <pguslisty@productengine.com> | 2011-09-07 18:46:51 +0300 |
commit | 955bcbb95106e9c0c5d8b75c42c32dde52cc0bb6 (patch) | |
tree | 663ad1c3e33c002ee7ea1bfa5c86d2b713839aba /indra/newview/llviewertexture.cpp | |
parent | bb085a45db845a9bfe8aae83ecc7938f618e9ddc (diff) | |
parent | 08c0de785f29801c57feebce8fae593f86113777 (diff) |
Merge mesh-development with sh-2309
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 |