diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/src/goomconfigparser.cpp --- a/uiacceltk/hitchcock/goommonitor/src/goomconfigparser.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/src/goomconfigparser.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -57,6 +57,7 @@ KGOomErrBadGoodThresholdValueForAppConfig, KGOomErrBadTargetFreeValueForAppConfig, KGOomErrBadSkipPluginValueForAppConfig, +KGOomErrBadUseSwRenderingValueForAppConfig, KGOomErrSystemPluginSettingsMustComeAfterAppCloseSettings, KGOomErrAppPluginSettingsMustComeAfterSystemPluginSettings, KGOomErrAppPluginIdleTimeRulesMustComeAfterAppPluginSettings, @@ -80,7 +81,8 @@ KGOomErrAppCloseIdleRuleOutsideAppCloseElement, KGOomErrForegroundAppRuleOutsideAppCloseElement, KGOomErrPluginIdleRuleOutsideAppPluginElement, -KGOomErrPluginForegroundRuleOutsidePluginElement +KGOomErrPluginForegroundRuleOutsidePluginElement, +KGOomErrInvalidSwRendConfig }; @@ -127,6 +129,9 @@ //App specific _LIT8(KGOomAttributeTargetFreeOnStartup, "target_free_on_startup"); _LIT8(KGOomAttributeSkipPlugin, "skip_plugin"); +_LIT8(KGOomAttributeUseSwRendering, "use_sw_rend"); +_LIT8(KGOomConfigUseSwRend, "Yes"); +_LIT8(KGOomConfigNotUseSwRend, "No"); // System plugins @@ -173,6 +178,10 @@ _LIT8(KGOomConfigBusyAppUid, "BUSY_APP"); _LIT8(KGOomConfigHighPriorityAppUid, "HIGH_PRIORITY_APP"); +_LIT8(KGOomAttibuteSwRend, "sw_rend"); +_LIT8(KGOomConfigSwRendSupported, "supported"); +_LIT8(KGOomConfigSwRendNotSupported, "not_supported"); + CGOomConfigParser::CGOomConfigParser(CGOomConfig& aConfig, RFs& aFs) : iConfig(aConfig), iFs(aFs), iState(EGOomParsingStateNone) { } @@ -501,7 +510,33 @@ ConfigError(KGOomErrBadSkipPluginValueForAppConfig); } - + // Get the software rendering config + if (err == KErrNone) + { + TPtrC8 swrendString; + TInt err = GetValueFromAttributeList(aAttributes, KGOomAttributeUseSwRendering, swrendString); + if (err == KErrNone) + { + if (swrendString == KGOomConfigUseSwRend) + { + TRACES1("Sw Rend configured for App %x", uid); + appConfig->iUseSwRendering = ETrue; + } + else + { + appConfig->iUseSwRendering = EFalse; + } + } + else if (err == KErrNotFound) + { + err = KErrNone; + appConfig->iUseSwRendering = EFalse; + } + + if (err != KErrNone) + ConfigError(KGOomErrBadUseSwRenderingValueForAppConfig); + } + // Add the applciation config to the main config if ((err == KErrNone) && (appConfig)) { @@ -772,8 +807,21 @@ { // Get the config for the sync mode for this plugin (if one is specified) and set it SetPluginSyncMode(aAttributes, *pluginConfig); + + TPtrC8 swrendString; + TInt err = GetValueFromAttributeList(aAttributes, KGOomAttibuteSwRend, swrendString); + if (err == KErrNone) + { + if (swrendString == KGOomConfigSwRendSupported) + pluginConfig->SetSwRend(ETrue); + else if (swrendString == KGOomConfigSwRendNotSupported) + pluginConfig->SetSwRend(EFalse); + else + ConfigError(KGOomErrInvalidSwRendConfig); + } + } - + iConfig.AddPluginConfigL(pluginConfig); CleanupStack::Pop(pluginConfig);