summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-09-06 09:42:11 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-09-06 09:42:11 -0400
commit08c0de785f29801c57feebce8fae593f86113777 (patch)
tree6661b84ca6540f0907b4321f6e49a88be75c2e98 /indra/newview/llviewertexture.cpp
parent76f867c8913094573bfa278fc39907d6b0779ec5 (diff)
parent0ab6eee0996c78d32b722157140cea5a21a5e460 (diff)
merge
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp12
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