photosgallery/viewframework/uiutilities/src/glxrequestfreegoom.cpp
branchRCL_3
changeset 24 ea65f74e6de4
parent 21 f9e827349359
--- a/photosgallery/viewframework/uiutilities/src/glxrequestfreegoom.cpp	Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/src/glxrequestfreegoom.cpp	Thu Aug 19 09:55:03 2010 +0300
@@ -20,7 +20,7 @@
 
 #include "glxrequestfreegoom.h"
 
-const TInt KMinMemoryRequest = 3145728; // 3 MB
+const TInt KMinMemoryRequest = 16000000; // 2000 x 2000 x 4 (32 bit display mode)
 
 // ----------------------------------------------------------------------------
 // CGlxRelaseGPUMemory::NewL
@@ -55,7 +55,7 @@
 //
 CGlxRelaseGPUMemory::CGlxRelaseGPUMemory(MGoomNotifierObserver& aNotify) :
     CActive(CActive::EPriorityStandard), iNotify(aNotify), iIsFirstRequest(
-            ETrue)
+            ETrue),iNotifyCaller(ETrue)
     {
     TRACER("CGlxRelaseGPUMemory::CGlxRelaseGPUMemory()");
     CActiveScheduler::Add(this);
@@ -104,9 +104,10 @@
 // CGlxRelaseGPUMemory::RequestMemory()
 // ----------------------------------------------------------------------------
 //
-EXPORT_C void CGlxRelaseGPUMemory::RequestMemory()
+EXPORT_C void CGlxRelaseGPUMemory::RequestMemory(TBool aRequest)
     {
     TRACER("CGlxRelaseGPUMemory::RequestMemory()");
+    iNotifyCaller = aRequest;
     IssueRequest();
     }
 
@@ -143,5 +144,9 @@
         }
 
     // Notify observer on the RequestFreeMemory() status
-    iNotify.HandleGoomMemoryReleased(iStatus.Int());
+    if(iNotifyCaller || (iStatus.Int() != KErrNone))
+        {
+    	iNotify.HandleGoomMemoryReleased(iStatus.Int());
+        }
+    iNotifyCaller = EFalse;
     }