summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2011-09-07 16:40:40 -0400
committerLogan Dethrow <log@lindenlab.com>2011-09-07 16:40:40 -0400
commitb8fddce34d1737acf32d83dac423dbb7a948cc4a (patch)
treeadf4c05ab3a42b2d3fed8fbda23c2de97840bab7 /indra/newview/pipeline.cpp
parentf73b795bb709b3060e06b4238ae4dac702f21301 (diff)
parent82b1b1bc6ee91e1778a16634fb9e2988da23fd71 (diff)
Merge. Fixed issue with LLProxy code related to changes to the LLSocket interface.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp20
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);