--- a/uiacceltk/hitchcock/goommonitor/src/goomrunplugin.cpp Wed Mar 31 23:03:58 2010 +0300
+++ b/uiacceltk/hitchcock/goommonitor/src/goomrunplugin.cpp Wed Apr 14 16:53:50 2010 +0300
@@ -36,7 +36,7 @@
// Run the GOOM plugin in order to free memory
// Call the CGOomAction::MemoryFreed when it is done
-void CGOomRunPlugin::FreeMemory(TInt aBytesRequested)
+void CGOomRunPlugin::FreeMemory(TInt aBytesRequested, TBool aUseSwRendering)
{
FUNC_LOG;
TRACES1("CGOomRunPlugin::FreeMemory: iPluginId = 0x%x", iPluginId);
@@ -47,7 +47,17 @@
TInt clientId = iStateChangeObserver.ClientId();
TAny* anyp = (TAny*) &clientId;
iPlugin.ExtensionInterface(TUid::Uid(KGoomClientSecureId), anyp);
- iPlugin.FreeRam(aBytesRequested);
+
+ if(aUseSwRendering && iConfig.IsSwRendSupported())
+ {
+ TInt flags = KGOomUseSwRendering;
+ iPlugin.FreeRam(aBytesRequested, flags);
+ iFreeMemoryWithSwRenderingCalled = ETrue;
+ }
+ else
+ {
+ iPlugin.FreeRam(aBytesRequested, 0);
+ }
iFreeMemoryCalled = ETrue;
@@ -66,8 +76,12 @@
if (iFreeMemoryCalled)
{
- iPlugin.MemoryGood();
+ TInt flags = 0;
+ if(iFreeMemoryWithSwRenderingCalled)
+ flags = KGOomUseSwRendering;
+ iPlugin.MemoryGood(flags);
iFreeMemoryCalled = EFalse;
+ iFreeMemoryWithSwRenderingCalled = EFalse;
}
}