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/pipeline.cpp | |
parent | a66b5fb8cfc590110bb698d490510d66b6d8b430 (diff) | |
parent | 2ae5e8db53e6d89e741cda0ce45e8cf65595bd16 (diff) |
reconciled .hgtags
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 7a26404138..a50f66f282 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -103,6 +103,7 @@ #include "llmutelist.h" #include "lltoolpie.h" #include "llcurl.h" +#include "llnotifications.h" void check_stack_depth(S32 stack_depth) @@ -317,6 +318,7 @@ BOOL LLPipeline::sRenderFrameTest = FALSE; BOOL LLPipeline::sRenderAttachedLights = TRUE; BOOL LLPipeline::sRenderAttachedParticles = TRUE; BOOL LLPipeline::sRenderDeferred = FALSE; +BOOL LLPipeline::sMemAllocationThrottled = FALSE; S32 LLPipeline::sVisibleLightCount = 0; F32 LLPipeline::sMinRenderSize = 0.f; @@ -561,6 +563,24 @@ void LLPipeline::destroyGL() static LLFastTimer::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); +//static +void LLPipeline::throttleNewMemoryAllocation(BOOL disable) +{ + if(sMemAllocationThrottled != disable) + { + sMemAllocationThrottled = disable ; + + if(sMemAllocationThrottled) + { + //send out notification + LLNotification::Params params("LowMemory"); + LLNotifications::instance().add(params); + + //release some memory. + } + } +} + void LLPipeline::resizeScreenTexture() { LLFastTimer ft(FTM_RESIZE_SCREEN_TEXTURE); |