# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271253230 -10800 # Node ID 46927d61fef3d51d7ca3a651cf4145063ef9897a # Parent 88b23e2e82e11e0cb57870846ee367e4071fa0e7 Revision: 201014 Kit: 201015 diff -r 88b23e2e82e1 -r 46927d61fef3 rom/alfred.iby --- a/rom/alfred.iby Wed Mar 31 23:03:58 2010 +0300 +++ b/rom/alfred.iby Wed Apr 14 16:53:50 2010 +0300 @@ -86,14 +86,18 @@ data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_close_editmode.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_close_editmode.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_close_widgetmanager.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_close_widgetmanager.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left.fxml -data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_appear.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_appear.fxml -data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_disappear.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_disappear.fxml +data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_appear_prt.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_appear_prt.fxml +data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_appear_lsc.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_appear_lsc.fxml +data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_disappear_prt.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_disappear_prt.fxml +data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_disappear_lsc.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_left_disappear_lsc.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_open_editmode.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_open_editmode.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_open_widgetmanager.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_open_widgetmanager.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_remove_page.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_remove_page.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right.fxml -data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_appear.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_appear.fxml -data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_disappear.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_disappear.fxml +data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_appear_prt.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_appear_prt.fxml +data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_appear_lsc.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_appear_lsc.fxml +data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_disappear_prt.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_disappear_prt.fxml +data=DATAZ_/RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_disappear_lsc.fxml RESOURCE_FILES_DIR/effects/activeidle_viewswitch_right_disappear_lsc.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/app_activate.fxml RESOURCE_FILES_DIR/effects/app_activate.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/app_exit.fxml RESOURCE_FILES_DIR/effects/app_exit.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/app_start.fxml RESOURCE_FILES_DIR/effects/app_start.fxml @@ -134,10 +138,10 @@ data=DATAZ_/RESOURCE_FILES_DIR/effects/optionsmenu_cascade_appear.fxml RESOURCE_FILES_DIR/effects/optionsmenu_cascade_appear.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/optionsmenu_cascade_disappear.fxml RESOURCE_FILES_DIR/effects/optionsmenu_cascade_disappear.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/optionsmenu_disappear.fxml RESOURCE_FILES_DIR/effects/optionsmenu_disappear.fxml +data=DATAZ_/RESOURCE_FILES_DIR/effects/photos_fullscreen_close.fxml RESOURCE_FILES_DIR/effects/photos_fullscreen_close.fxml +data=DATAZ_/RESOURCE_FILES_DIR/effects/photos_fullscreen_open.fxml RESOURCE_FILES_DIR/effects/photos_fullscreen_open.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/photos_gridview_appear.fxml RESOURCE_FILES_DIR/effects/photos_gridview_appear.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/photos_gridview_disappear.fxml RESOURCE_FILES_DIR/effects/photos_gridview_disappear.fxml -data=DATAZ_/RESOURCE_FILES_DIR/effects/photos_fullscreen_close.fxml RESOURCE_FILES_DIR/effects/photos_fullscreen_close.fxml -data=DATAZ_/RESOURCE_FILES_DIR/effects/photos_fullscreen_open.fxml RESOURCE_FILES_DIR/effects/photos_fullscreen_open.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/popup_appear.fxml RESOURCE_FILES_DIR/effects/popup_appear.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/popup_disappear.fxml RESOURCE_FILES_DIR/effects/popup_disappear.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/popup_disappear_screenshot.fxml RESOURCE_FILES_DIR/effects/popup_disappear_screenshot.fxml @@ -149,7 +153,6 @@ data=DATAZ_/RESOURCE_FILES_DIR/effects/systemnotify_appear.fxml RESOURCE_FILES_DIR/effects/systemnotify_appear.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/systemnotify_disappear.fxml RESOURCE_FILES_DIR/effects/systemnotify_disappear.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/tab_effect.fxml RESOURCE_FILES_DIR/effects/tab_effect.fxml -data=DATAZ_/RESOURCE_FILES_DIR/effects/taskswapper_app_start_disappear.fxml RESOURCE_FILES_DIR/effects/taskswapper_app_start_disappear.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/taskswapper_app_start_rect.fxml RESOURCE_FILES_DIR/effects/taskswapper_app_start_rect.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/taskswapper_appear.fxml RESOURCE_FILES_DIR/effects/taskswapper_appear.fxml data=DATAZ_/RESOURCE_FILES_DIR/effects/taskswapper_disappear.fxml RESOURCE_FILES_DIR/effects/taskswapper_disappear.fxml diff -r 88b23e2e82e1 -r 46927d61fef3 uiaccelerator_plat/alf_client_server_api/inc/alf/alfappui.h --- a/uiaccelerator_plat/alf_client_server_api/inc/alf/alfappui.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiaccelerator_plat/alf_client_server_api/inc/alf/alfappui.h Wed Apr 14 16:53:50 2010 +0300 @@ -198,7 +198,8 @@ TInt ForceSwRendering(TBool aEnabled); TInt GetSizeAndRotation(TSize& aSize, TInt& aRotation); TInt ReadPixels(CFbsBitmap* aBitmap); - void SetAlfAppWindowGroup( TInt aID ); + void SetAlfAppWindowGroup( TInt aId ); + void RemoveAlfAppWindowGroup( TInt aId ); CAlfAppSrvSessionBase* SrvSessionForControlGroup(CHuiControlGroup& aGroup); void DoBlankScreen(const RMessage2& aMessage); diff -r 88b23e2e82e1 -r 46927d61fef3 uiaccelerator_plat/alf_client_server_api/inc/alf/alfdirectclient.h --- a/uiaccelerator_plat/alf_client_server_api/inc/alf/alfdirectclient.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiaccelerator_plat/alf_client_server_api/inc/alf/alfdirectclient.h Wed Apr 14 16:53:50 2010 +0300 @@ -57,7 +57,7 @@ * * @param aMode ETrue to enable low memory, EFalse to disable */ - IMPORT_C void EnableLowMemoryState( TBool aMode ); + IMPORT_C void EnableLowMemoryState( TBool aMode, TBool aUseSwRendering); /** * Forces SW rendering to be used. diff -r 88b23e2e82e1 -r 46927d61fef3 uiaccelerator_plat/alf_visual_api/inc/alf/alfcompositionutility.h --- a/uiaccelerator_plat/alf_visual_api/inc/alf/alfcompositionutility.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiaccelerator_plat/alf_visual_api/inc/alf/alfcompositionutility.h Wed Apr 14 16:53:50 2010 +0300 @@ -295,4 +295,40 @@ CAlfCompositionSourceData* iData; }; +NONSHARABLE_CLASS(CAlfEffectObserver): public CBase + { +public: + + class MAlfEffectObserver + { + public: + /** bit field */ + enum{ + EAlfEffectStarted = 0x1, + EAlfEffectComplete = 0x2 + }; + virtual void HandleEffectCallback(TInt aType, TInt aHandle, TInt aStatus) = 0; + }; + + IMPORT_C static CAlfEffectObserver* NewL(); + IMPORT_C ~CAlfEffectObserver(); + + /** + * Asks the number of active effects + * @return error code or number of active effects (>= 0). + */ + IMPORT_C TInt ActiveEffectsCount(); + + /** + * Subscribe callback for a handle + * @leave system wide error code + */ + IMPORT_C void SubscribeCallbackL(MAlfEffectObserver* aObserver, TInt aHandle, TInt aType = MAlfEffectObserver::EAlfEffectComplete ); + +private: + CAlfEffectObserver(); + class CAlfEffectObserverData; + CAlfEffectObserverData* iData; + }; + #endif // #define __ALFCOMPOSITIONUTILITY_H__ diff -r 88b23e2e82e1 -r 46927d61fef3 uiaccelerator_plat/alf_visual_api/inc/goommonitor/goommonitorplugin.h --- a/uiaccelerator_plat/alf_visual_api/inc/goommonitor/goommonitorplugin.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiaccelerator_plat/alf_visual_api/inc/goommonitor/goommonitorplugin.h Wed Apr 14 16:53:50 2010 +0300 @@ -25,6 +25,11 @@ class RFs; class RWsSession; +enum TGOomMonitorFlags + { + KGOomNone = 0, + KGOomUseSwRendering + }; /** * Panic codes with category "OomMonitorPlugin" @@ -66,8 +71,8 @@ * FreeRam is called when the system RAM level becomes * low. This plugin is requested to help free some RAM. */ - virtual void FreeRam(TInt aBytesToFree) = 0; - + //virtual void FreeRam(TInt aBytesToFree); + virtual void FreeRam(TInt aBytesToFree, TInt aFlags) = 0; /** * MemoryGood is called when the system RAM level becomes * good after being low.The plugin may take this opportunity @@ -77,7 +82,8 @@ * used over time, otherwise the plugin may cause oscillation * between low and good memory states. */ - virtual void MemoryGood() = 0; + //virtual void MemoryGood(); + virtual void MemoryGood(TInt aFlags) = 0; public: /** @@ -114,8 +120,8 @@ * @param aBytesToFree The minimum number of bytes of free memory that the plugin should try to free. */ - virtual void FreeRam(TInt aBytesToFree) = 0; - + virtual void FreeRam(TInt aBytesToFree, TInt aFlags) = 0; + /** * MemoryGood is called when the system RAM level becomes * good after being low.The plugin may take this opportunity @@ -125,7 +131,8 @@ * used over time, otherwise the plugin may cause oscillation * between low and good memory states. */ - virtual void MemoryGood() = 0; + virtual void MemoryGood(TInt aFlags) = 0; + }; @@ -170,8 +177,11 @@ private: CAppGOomMonitorPlugin(TUid aAppUid); - void FreeRam(TInt aFreeMemory); + /*void FreeRam(TInt aFreeMemory); void MemoryGood(); + */ + void FreeRam(TInt aBytesToFree, TInt aFlags); + void MemoryGood(TInt aFlags); void SendMessageToApp(TInt aMessage); diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/AlfDecoderServerClient/bwins/alfdecoderserverclientu.def --- a/uiacceltk/hitchcock/AlfDecoderServerClient/bwins/alfdecoderserverclientu.def Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/AlfDecoderServerClient/bwins/alfdecoderserverclientu.def Wed Apr 14 16:53:50 2010 +0300 @@ -41,6 +41,12 @@ ??1CAlfCompositionCntrlClient@@UAE@XZ @ 40 NONAME ; CAlfCompositionCntrlClient::~CAlfCompositionCntrlClient(void) ?SetSourceRect@CAlfCompositionSource@@UAEHABVTRect@@@Z @ 41 NONAME ; int CAlfCompositionSource::SetSourceRect(class TRect const &) ?GetListOfInactiveWindowGroupsWSurfaces@RAlfBridgerClient@@QAEHPAV?$RArray@H@@@Z @ 42 NONAME ; int RAlfBridgerClient::GetListOfInactiveWindowGroupsWSurfaces(class RArray *) - ?NewL@CAlfCompositionPixelSource@@SAPAV1@AAVMAlfBufferProvider@@HPAVRWindow@@@Z @ 43 NONAME ; class CAlfCompositionPixelSource * CAlfCompositionPixelSource::NewL(class MAlfBufferProvider &, int, class RWindow *) - ?ActivateSyncL@CAlfCompositionPixelSource@@QAEXXZ @ 44 NONAME ; void CAlfCompositionPixelSource::ActivateSyncL(void) + ?NewL@CAlfCompositionPixelSource@@SAPAV1@AAVMAlfBufferProvider@@HPAVRWindow@@@Z @ 43 NONAME ; class CAlfCompositionPixelSource * CAlfCompositionPixelSource::NewL(class MAlfBufferProvider &, int, class RWindow *) + ?ActivateSyncL@CAlfCompositionPixelSource@@QAEXXZ @ 44 NONAME ; void CAlfCompositionPixelSource::ActivateSyncL(void) + ?EffectsCount@RAlfBridgerClient@@QAEHXZ @ 45 NONAME ; SBS RULES OK + ?ActiveEffectsCount@CAlfEffectObserver@@QAEHXZ @ 46 NONAME ; int CAlfEffectObserver::ActiveEffectsCount(void) + ?NewL@CAlfEffectObserver@@SAPAV1@XZ @ 47 NONAME ; class CAlfEffectObserver * CAlfEffectObserver::NewL(void) + ??1CAlfEffectObserver@@UAE@XZ @ 48 NONAME ; CAlfEffectObserver::~CAlfEffectObserver(void) + ?SubscribeCallbackL@CAlfEffectObserver@@QAEXPAVMAlfEffectObserver@1@HH@Z @ 49 NONAME ; void CAlfEffectObserver::SubscribeCallbackL(class CAlfEffectObserver::MAlfEffectObserver *, int, int) + ?GetListOfWindowGroupsWSurfaces@RAlfBridgerClient@@QAEHPAV?$RArray@H@@@Z @ 50 NONAME ; int RAlfBridgerClient::GetListOfWindowGroupsWSurfaces(class RArray *) diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/AlfDecoderServerClient/eabi/alfdecoderserverclientu.def --- a/uiacceltk/hitchcock/AlfDecoderServerClient/eabi/alfdecoderserverclientu.def Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/AlfDecoderServerClient/eabi/alfdecoderserverclientu.def Wed Apr 14 16:53:50 2010 +0300 @@ -64,4 +64,12 @@ _ZN17RAlfBridgerClient38GetListOfInactiveWindowGroupsWSurfacesEP6RArrayIiE @ 63 NONAME _ZN26CAlfCompositionPixelSource4NewLER18MAlfBufferProvideriP7RWindow @ 64 NONAME _ZN26CAlfCompositionPixelSource13ActivateSyncLEv @ 65 NONAME + _ZN17RAlfBridgerClient12EffectsCountEv @ 66 NONAME + _ZN18CAlfEffectObserver18ActiveEffectsCountEv @ 67 NONAME + _ZN18CAlfEffectObserver4NewLEv @ 68 NONAME + _ZN18CAlfEffectObserverD0Ev @ 69 NONAME + _ZN18CAlfEffectObserverD1Ev @ 70 NONAME + _ZN18CAlfEffectObserverD2Ev @ 71 NONAME + _ZN18CAlfEffectObserver18SubscribeCallbackLEPNS_18MAlfEffectObserverEii @ 72 NONAME + _ZN17RAlfBridgerClient30GetListOfWindowGroupsWSurfacesEP6RArrayIiE @ 73 NONAME diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/AlfDecoderServerClient/src/alfcompositionclient.cpp --- a/uiacceltk/hitchcock/AlfDecoderServerClient/src/alfcompositionclient.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/AlfDecoderServerClient/src/alfcompositionclient.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -1231,4 +1231,104 @@ CAlfCompositionSource::HandleEventL( aEventType, aEventData ); } +class CAlfSignalObserver; + +class MAlfEffectObserverData + { + public: + virtual void Remove(CAlfSignalObserver* aObserver) = 0; + }; + +NONSHARABLE_CLASS(CAlfEffectObserver::CAlfEffectObserverData): public CBase, public MAlfEffectObserverData + { + public: + void SubscribeCallbackL(MAlfEffectObserver* aObserver, TInt aHandle, TInt aType = MAlfEffectObserver::EAlfEffectComplete ); + ~CAlfEffectObserverData(); + void Remove(CAlfSignalObserver* aObserver); + + // data + RAlfBridgerClient iClient; + RPointerArray iObservers; + }; + + +NONSHARABLE_CLASS(CAlfSignalObserver):public CActive + { + public: + CAlfSignalObserver(CAlfEffectObserver::MAlfEffectObserver* aObserver, MAlfEffectObserverData* aOwner, TInt aHandle, TInt aType):CActive(EPriorityStandard), + iOwner(aOwner), iObserver(aObserver), iHandle(aHandle), iType(aType), iArgs(aHandle,aType) + { + CActiveScheduler::Add(this); + SetActive(); + } + + void DoCancel(){} // do not... + + void RunL() + { + iObserver->HandleEffectCallback(iType, iHandle, iStatus.Int()); + iOwner->Remove(this); + } + + MAlfEffectObserverData* iOwner; + CAlfEffectObserver::MAlfEffectObserver* iObserver; + TInt iHandle; + TInt iType; + TIpcArgs iArgs; + }; + +void CAlfEffectObserver::CAlfEffectObserverData::SubscribeCallbackL(MAlfEffectObserver* aObserver, TInt aHandle, TInt aType) + { + CAlfSignalObserver* obs = new (ELeave) CAlfSignalObserver(aObserver, this, aHandle, aType); + CleanupStack::PushL(obs); + User::LeaveIfError(iObservers.Append(obs)); + CleanupStack::Pop(); + iClient.SendAsynchronous(EAlfRequestSignal, obs->iArgs, obs->iStatus); + } + +CAlfEffectObserver::CAlfEffectObserverData::~CAlfEffectObserverData() + { + iClient.Close(); // destroys signals + iObservers.ResetAndDestroy(); + } + +void CAlfEffectObserver::CAlfEffectObserverData::Remove(CAlfSignalObserver* aObserver) + { + TInt index = iObservers.Find(aObserver); + iObservers.Remove(index); + delete aObserver; + } + +EXPORT_C CAlfEffectObserver* CAlfEffectObserver::NewL() + { + CAlfEffectObserver* me = new (ELeave) CAlfEffectObserver(); + CleanupStack::PushL(me); + me->iData = new (ELeave) CAlfEffectObserverData(); + User::LeaveIfError(me->iData->iClient.Connect()); + CleanupStack::Pop(); + return me; + } + +EXPORT_C CAlfEffectObserver::~CAlfEffectObserver() + { + delete iData; + } + +EXPORT_C TInt CAlfEffectObserver::ActiveEffectsCount() + { + return iData->iClient.EffectsCount(); + } + +EXPORT_C void CAlfEffectObserver::SubscribeCallbackL(MAlfEffectObserver* aObserver, TInt aHandle, TInt aType) + { + iData->SubscribeCallbackL(aObserver, aHandle, aType ); + } + +CAlfEffectObserver::CAlfEffectObserver() + { + } + + + + //end of file diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/AlfDecoderServerClient/src/alfdecoderserverclient.cpp --- a/uiacceltk/hitchcock/AlfDecoderServerClient/src/alfdecoderserverclient.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/AlfDecoderServerClient/src/alfdecoderserverclient.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -147,13 +147,12 @@ SendReceive(aOp, aIPCArgs, aStatus ); } - -EXPORT_C TInt RAlfBridgerClient::GetListOfInactiveWindowGroupsWSurfaces(RArray* aWindowGroups) +TInt RAlfBridgerClient::GetListOfWindowGroups(RArray* aWindowGroups, TBool aListAll) { TInt err = KErrNone; TInt array[10]; TPtr8 ptr((TUint8*)array,0,40); - err = SendReceive(EAlfGetListOfWGsHavingInactiveSurfaces, TIpcArgs(&ptr)); + err = SendReceive(EAlfGetListOfWGsHavingInactiveSurfaces, TIpcArgs(&ptr, aListAll)); if (!err) { for(TInt i = 0; i < 10; i++) @@ -171,6 +170,28 @@ return err; } +EXPORT_C TInt RAlfBridgerClient::GetListOfInactiveWindowGroupsWSurfaces(RArray* aWindowGroups) + { + return GetListOfWindowGroups(aWindowGroups, EFalse); + } + +EXPORT_C TInt RAlfBridgerClient::GetListOfWindowGroupsWSurfaces(RArray* aWindowGroups) + { + return GetListOfWindowGroups(aWindowGroups, ETrue); + } + + + +// --------------------------------------------------------------------------- +// EffectsCount +// --------------------------------------------------------------------------- +// +EXPORT_C TInt RAlfBridgerClient::EffectsCount() + { + return SendReceive(EAlfGetNumberOfActiveEffects, TIpcArgs()); + } + + // Open // --------------------------------------------------------------------------- // diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/AlfRenderStage/src/alfrssendbuffer.cpp --- a/uiacceltk/hitchcock/AlfRenderStage/src/alfrssendbuffer.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/AlfRenderStage/src/alfrssendbuffer.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -1176,10 +1176,11 @@ // ARRAY IMPLEMENTATION // +#ifdef RD_SUBWINDOW_EFFECTS + const TInt KArrayOffsetTemplate = 23456789; const TInt KArraySizeTemplate = 23456789; -#ifdef RD_SUBWINDOW_EFFECTS void CAlfRsSendBuffer::WriteArrayHeaderTemplateL() { WriteInt8L( EAlfCommandIndexArrayHeader ); @@ -1455,6 +1456,7 @@ iBufStream->Open( iChunk.Base() + sizeof( TChunkHeader), iPrimaryChunkMaxSize ); #else delete iStreamPtr; + iStreamPtr = NULL; iStreamPtr = new(ELeave)TPtr8( (TUint8*)(iChunk.Base() + sizeof( TChunkHeader)), iPrimaryChunkMaxSize - sizeof( TChunkHeader)); iChunkHeader->iMemWriteStream = (RMemWriteStream*)1; #endif diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/Client/BWINS/alfclientu.DEF --- a/uiacceltk/hitchcock/Client/BWINS/alfclientu.DEF Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/Client/BWINS/alfclientu.DEF Wed Apr 14 16:53:50 2010 +0300 @@ -1102,7 +1102,7 @@ ?MeasureFPS@RAlfDirectClient@@QAEXJH@Z @ 1101 NONAME ; void RAlfDirectClient::MeasureFPS(long, int) ??0RAlfDirectClient@@QAE@XZ @ 1102 NONAME ; RAlfDirectClient::RAlfDirectClient(void) ?Disconnect@RAlfDirectClient@@QAEXXZ @ 1103 NONAME ; void RAlfDirectClient::Disconnect(void) - ?EnableLowMemoryState@RAlfDirectClient@@QAEXH@Z @ 1104 NONAME ; void RAlfDirectClient::EnableLowMemoryState(int) + ?EnableLowMemoryState@RAlfDirectClient@@QAEXHH@Z @ 1104 NONAME ; void RAlfDirectClient::EnableLowMemoryState(int, int) ?SetGroupEffectL@CAlfVisual@@QAEXABVTDesC16@@H@Z @ 1105 NONAME ; void CAlfVisual::SetGroupEffectL(class TDesC16 const &, int) ?ForceSwRendering@RAlfDirectClient@@QAEHH@Z @ 1106 NONAME ; int RAlfDirectClient::ForceSwRendering(int) ?Finish@CAlfDrawer@@QAEHXZ @ 1107 NONAME ; int CAlfDrawer::Finish(void) diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/Client/eabi/alfclientu.DEF --- a/uiacceltk/hitchcock/Client/eabi/alfclientu.DEF Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/Client/eabi/alfclientu.DEF Wed Apr 14 16:53:50 2010 +0300 @@ -1335,7 +1335,7 @@ _ZN16RAlfDirectClient10DisconnectEv @ 1334 NONAME _ZN16RAlfDirectClientC1Ev @ 1335 NONAME _ZN16RAlfDirectClientC2Ev @ 1336 NONAME - _ZN16RAlfDirectClient20EnableLowMemoryStateEi @ 1337 NONAME + _ZN16RAlfDirectClient20EnableLowMemoryStateEii @ 1337 NONAME _ZN10CAlfVisual15SetGroupEffectLERK7TDesC16i @ 1338 NONAME _ZN16RAlfDirectClient16ForceSwRenderingEi @ 1339 NONAME _ZN10CAlfDrawer4NewLEv @ 1340 NONAME diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/Client/src/alfdirectclient.cpp --- a/uiacceltk/hitchcock/Client/src/alfdirectclient.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/Client/src/alfdirectclient.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -42,7 +42,7 @@ Send( command, TIpcArgs(aId)); } -EXPORT_C void RAlfDirectClient::EnableLowMemoryState( TBool aMode ) +EXPORT_C void RAlfDirectClient::EnableLowMemoryState( TBool aMode , TBool aUseSwRendering) { if (!Handle()) { diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/CommonInc/alfdecoderserverclient.h --- a/uiacceltk/hitchcock/CommonInc/alfdecoderserverclient.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/CommonInc/alfdecoderserverclient.h Wed Apr 14 16:53:50 2010 +0300 @@ -58,7 +58,24 @@ * @return error code. */ IMPORT_C TInt GetListOfInactiveWindowGroupsWSurfaces(RArray* aWindowGroups); + + /** + * Asks list of window groups that have graphics surfaces attached + * @param aArray array to be populated + * @return error code. + */ + IMPORT_C TInt GetListOfWindowGroupsWSurfaces(RArray* aWindowGroups); + + + /** + * Asks the number of active effects + * @return error code or number of active effects (>= 0). + */ + IMPORT_C TInt EffectsCount(); + private: + + TInt GetListOfWindowGroups(RArray* aWindowGroups, TBool aListAll); TInt iSpare1; TInt iSpare2; }; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/CommonInc/alfmoduletest.h --- a/uiacceltk/hitchcock/CommonInc/alfmoduletest.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/CommonInc/alfmoduletest.h Wed Apr 14 16:53:50 2010 +0300 @@ -3,6 +3,7 @@ #include +#include #include // Informs if module test hooks have been set on. @@ -32,7 +33,7 @@ NONSHARABLE_CLASS(CAlfModuleTestData) : public CBase { public: - void PrintState() + void PrintState() const { RDebug::Print(_L("*** ALF INTERNAL STATE ***")); RDebug::Print(_L("iTotalLayerCount[0]=%d"), iTotalLayerCount[0]); @@ -82,11 +83,13 @@ PrintSizeMapState( iSizeMap ); RDebug::Print(_L("iPositionMap =>")); PrintPositionMapState( iPositionMap ); + RDebug::Print(_L("iSurfaceMap =>")); + PrintSurfaceMapState( iSurfaceMap ); RDebug::Print(_L("*** ALF INTERNAL STATE ***")); } - void PrintBoolMapState( TAlfModuleTestMap< TBool > aMap ) + void PrintBoolMapState( const TAlfModuleTestMap< TBool >& aMap ) const { RDebug::Print(_L("*** ALF INTERNAL BOOL MAP STATE -->")); RDebug::Print(_L("Map item count=%d"), aMap.ItemCount()); @@ -100,7 +103,7 @@ } - void PrintIntMapState( TAlfModuleTestMap< TInt > aMap ) + void PrintIntMapState( const TAlfModuleTestMap< TInt >& aMap ) const { RDebug::Print(_L("*** ALF INTERNAL INT MAP STATE -->")); RDebug::Print(_L("Map item count=%d"), aMap.ItemCount()); @@ -114,7 +117,7 @@ } - void PrintSizeMapState( TAlfModuleTestMap< TSize > aMap ) + void PrintSizeMapState( const TAlfModuleTestMap< TSize >& aMap ) const { RDebug::Print(_L("*** ALF INTERNAL SIZE MAP STATE -->")); RDebug::Print(_L("Map item count=%d"), aMap.ItemCount()); @@ -130,7 +133,7 @@ } - void PrintPositionMapState( TAlfModuleTestMap< TPoint > aMap ) + void PrintPositionMapState( const TAlfModuleTestMap< TPoint >& aMap ) const { RDebug::Print(_L("*** ALF INTERNAL POSITION MAP STATE -->")); RDebug::Print(_L("Map item count=%d"), aMap.ItemCount() ); @@ -143,9 +146,26 @@ i, item.Value().iX, item.Value().iY); } RDebug::Print(_L("<-- ALF INTERNAL POSITION MAP STATE ***")); - } + } + void PrintSurfaceMapState( const TAlfModuleTestMap< TSurfaceId >& aMap ) const + { + RDebug::Print(_L("*** ALF INTERNAL SURFACE MAP STATE -->")); + RDebug::Print(_L("Map item count=%d"), aMap.ItemCount() ); + for ( TInt i = 0; i < aMap.ItemCount(); ++i ) + { + const TAlfModuleTestItem< TSurfaceId >& item( aMap.Item( i ) ); + RDebug::Print(_L("Map item %d, iKey=%d, iTestType=%d, iValueSetCount=%d, iLinkTargetKey=%d"), + i, item.Key(), item.TestType(), item.ValueSetCount(), item.LinkTargetKey()); + RDebug::Print(_L("Map item index=%d, internal0=%d, internal1=%d, internal2=%d, internal3=%d"), + i, item.Value().iInternal[ 0 ], item.Value().iInternal[ 1 ], + item.Value().iInternal[ 2 ], item.Value().iInternal[ 3 ] ); + } + RDebug::Print(_L("<-- ALF INTERNAL SURFACE MAP STATE ***")); + } + + public: TBool iIsEnabled; // *** not yet implemented. For run-time enabling/disabling of the test system. @@ -204,15 +224,19 @@ TInt iASE_Temp3; TInt iASE_Temp4; - // Map that contains boolean items that can be specified for certain test cases. + // Map that contains boolean items for certain test cases. TAlfModuleTestMap< TBool > iBoolMap; - // Map that contains integer items that can be specified for certain test cases. + // Map that contains integer items for certain test cases. TAlfModuleTestMap< TInt > iIntMap; - // Map that contains size items that can be specified for certain test cases. + // Map that contains size items for certain test cases. TAlfModuleTestMap< TSize > iSizeMap; - // Map that contains position items that can be specified for certain test cases. - TAlfModuleTestMap< TPoint > iPositionMap; - + // Map that contains position items for certain test cases. + TAlfModuleTestMap< TPoint > iPositionMap; + // Map that contains rect items for certain test cases. + TAlfModuleTestMap< TRect > iRectMap; + // Map that contains surface id items for layer/surface test cases. + TAlfModuleTestMap< TSurfaceId > iSurfaceMap; + }; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/CommonInc/alfmoduletestconsts.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uiacceltk/hitchcock/CommonInc/alfmoduletestconsts.h Wed Apr 14 16:53:50 2010 +0300 @@ -0,0 +1,37 @@ +/** + * Provides general constants for test cases. + */ + +#include "alfmoduletestconf.h" +#ifdef USE_MODULE_TEST_HOOKS_FOR_ALF + +#ifndef ALFMODULETESTCONSTS_H +#define ALFMODULETESTCONSTS_H + +#include + + +/** + * Constants + */ +namespace AlfModuleTestConsts + { + /** + * When flush is requested, the flow should wait long enough. + * Then, a test case should have plenty of time to finish itself. + */ + const TInt KFlushLongWaitTime( 2000000 ); + + /** + * When flush is requested, the flow should wait. + * Then, a normal test case should have enough time to finish itself. + */ + const TInt KFlushWaitTime( 200000 ); + } + + +#endif // ALFMODULETESTCONSTS_H + +#endif // USE_MODULE_TEST_HOOKS_FOR_ALF + +// End of File diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/CommonInc/alfmoduletestdefines.h --- a/uiacceltk/hitchcock/CommonInc/alfmoduletestdefines.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/CommonInc/alfmoduletestdefines.h Wed Apr 14 16:53:50 2010 +0300 @@ -152,6 +152,16 @@ AMT_MAP_INC_VALUE_IF( ( aWindowTreeNode.NodeType() == MWsWindowTreeNode::EWinTreeNodeStandardTextCursor && aAttribute == ECursorFlags ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeRenderStageChangeTextCursorFlag ); \ AMT_MAP_INC_VALUE_IF( ( aWindowTreeNode.NodeType() == MWsWindowTreeNode::EWinTreeNodeStandardTextCursor && aAttribute == ECursorColor ), iIntMap, AMT_MAP_TEXT_CURSOR_HANDLE, EAlfModuleTestTypeRenderStageChangeTextCursorColor ) +#define AMT_MAP_RENDER_STAGE_ADD_LAYER() \ + AMT_MAP_APPEND_IF( aLayer, iSurfaceMap, AMT_MAP_PTR_TO_KEY_CAST( aLayer ), TSurfaceId::CreateNullId(), EAlfModuleTestTypeRenderStageCreateLayer ); \ + AMT_MAP_APPEND_IF( aLayer, iSurfaceMap, AMT_MAP_PTR_TO_KEY_CAST( aLayer ), TSurfaceId::CreateNullId(), EAlfModuleTestTypeRenderStageReleaseLayer ) + +#define AMT_MAP_RENDER_STAGE_ADD_LAYER_LINK() \ + AMT_MAP_APPEND_LINK( iSurfaceMap, windowId, AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), EAlfModuleTestTypeRenderStageCreateLayer ); \ + AMT_MAP_APPEND_LINK( iSurfaceMap, windowId, AMT_MAP_PTR_TO_KEY_CAST( &aLayer ), EAlfModuleTestTypeRenderStageReleaseLayer ); \ + \ + AMT_MAP_SET_VALUE( iSurfaceMap, windowId, aLayer.Surface(), EAlfModuleTestTypeRenderStageCreateLayer ) + // Streamer defines @@ -190,16 +200,16 @@ AMT_MAP_APPEND_AND_LINK( iPositionMap, aWindowNodeId, aClientSideId, TPoint(), EAlfModuleTestTypeBridgeChangeWindowPosition ); \ AMT_MAP_APPEND_AND_LINK( iBoolMap, aWindowNodeId, aClientSideId, EFalse, EAlfModuleTestTypeBridgeChangeWindowVisibility ); \ \ - AMT_MAP_APPEND_AND_LINK_IF( aVisual, iIntMap, AMT_MAP_CPTR_TO_KEY_CAST( aVisual ), aClientSideId, 0, EAlfModuleTestTypeCoreToolkitDrawWindow ); \ - AMT_MAP_APPEND_AND_LINK_IF( aVisual, iIntMap, AMT_MAP_CPTR_TO_KEY_CAST( aVisual ), aClientSideId, 0, EAlfModuleTestTypeCoreToolkitDrawFromRenderBuffer ); \ - \ - AMT_MAP_INC_VALUE( iIntMap, aClientSideId, EAlfModuleTestTypeBridgeCreateWindow ); \ + AMT_MAP_APPEND_AND_LINK_IF( aVisual, iRectMap, AMT_MAP_CPTR_TO_KEY_CAST( aVisual ), aClientSideId, TRect(), EAlfModuleTestTypeCoreToolkitDrawWindow ); \ + AMT_MAP_APPEND_AND_LINK_IF( aVisual, iRectMap, AMT_MAP_CPTR_TO_KEY_CAST( aVisual ), aClientSideId, TRect(), EAlfModuleTestTypeCoreToolkitDrawFromRenderBuffer ); \ \ AMT_MAP_APPEND( iBoolMap, aClientSideId, ETrue, EAlfModuleTestTypeBridgeCreateWindow ); \ AMT_MAP_APPEND( iBoolMap, aClientSideId, EFalse, EAlfModuleTestTypeBridgeVisualVisibility ); \ AMT_MAP_APPEND_LINK_IF( aVisual, iBoolMap, AMT_MAP_CPTR_TO_KEY_CAST( aVisual ), aClientSideId, EAlfModuleTestTypeBridgeVisualVisibility ); \ AMT_MAP_APPEND( iBoolMap, aClientSideId, EFalse, EAlfModuleTestTypeBridgeReleaseWindow ); \ - AMT_MAP_APPEND_LINK( iBoolMap, aWindowNodeId, aClientSideId, EAlfModuleTestTypeBridgeReleaseWindow ) + AMT_MAP_APPEND_LINK( iBoolMap, aWindowNodeId, aClientSideId, EAlfModuleTestTypeBridgeReleaseWindow ); \ + \ + AMT_MAP_INC_VALUE( iIntMap, aClientSideId, EAlfModuleTestTypeBridgeCreateWindow ) #define AMT_MAP_BRIDGE_CREATE_CONTROL_GROUP() \ AMT_MAP_APPEND_AND_LINK( iIntMap, aWindowGroupNodeId, aClientWindowGroupId, 0, EAlfModuleTestTypeBridgeCreateWindowGroup ); \ diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/CommonInc/alfmoduletestmap.h --- a/uiacceltk/hitchcock/CommonInc/alfmoduletestmap.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/CommonInc/alfmoduletestmap.h Wed Apr 14 16:53:50 2010 +0300 @@ -216,12 +216,16 @@ * @param aTestType Describes for what case the item is for. * @param aKey Key of the map item. * @param aValue If map item is found, value of the item is set here. + * @param aAcceptDefault ETrue if an existing object having its default value + * is accepted. EFalse if value should have been updated + * separately. * @return TBool ETrue if map item is found and value has been set. Else EFalse. */ - TBool GetActualValue( const TAlfModuleTestType& aTestType, TInt aKey, T& aValue ) + TBool GetActualValue( + const TAlfModuleTestType& aTestType, TInt aKey, T& aValue, TBool aAcceptDefault ) { const TAlfModuleTestItem< T >* item( FindActual( aTestType, aKey ) ); - if ( item && item->ValueSetCount() > 0 ) + if ( item && ( aAcceptDefault || item->ValueSetCount() > 0 ) ) { aValue = item->Value(); return ETrue; @@ -233,12 +237,15 @@ /** * Finds an actual item if it exists and checks if it equals the given value. * + * @param aTestType Describes for what case the item is for. + * @param aKey Key of the map item. + * @param aValue Value of the map item. * @return TBool ETrue if item is found and its value equals given value. Else EFalse. */ TBool ActualEquals( const TAlfModuleTestType& aTestType, TInt aKey, const T& aValue ) { T value( aValue ); - if ( GetActualValue( aTestType, aKey, value ) && value == aValue ) + if ( GetActualValue( aTestType, aKey, value, ETrue ) && value == aValue ) { return ETrue; } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Inc/alfbridge.h --- a/uiacceltk/hitchcock/ServerCore/Inc/alfbridge.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Inc/alfbridge.h Wed Apr 14 16:53:50 2010 +0300 @@ -134,7 +134,7 @@ CAlfScreen* aScreen, TBool& aSubtreeVisible, TBool& aHasVisualsWithLayers, - TBool aChildCanBeOpaque ); + TBool aChildCanBeOpaque, TBool aOnlyForEmbeddedAlfApp = EFalse ); /** * Updates layer visibilities. @@ -262,6 +262,11 @@ * Sets HuiControlGroup as Alf application window group */ void SetWindowGroupAsAlfApp(TInt aId); + + /** + * removes Alf application window group tag + */ + void RemoveWindowGroupAsAlfApp(TInt aId); // From MHuiSynchronizationObserver void Synchronized(TInt aId); @@ -292,6 +297,8 @@ void LayoutSwitchStart(); void LayoutSwitchComplete(); + RAlfBridgerClient* BridgerClient(); + private: @@ -989,6 +996,8 @@ TInt iIdForEAlfDSSynchronizeOp; TInt iIdForLayoutSwitchFrameSync; + RArray iAlfNativeClientsWgIds; + #ifdef ALF_DEBUG_PRINT_WINDOWGROUP_ORDER TInt activevisualcount; TInt passivevisualcount; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Inc/alfhierarchymodel.h --- a/uiacceltk/hitchcock/ServerCore/Inc/alfhierarchymodel.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Inc/alfhierarchymodel.h Wed Apr 14 16:53:50 2010 +0300 @@ -197,6 +197,11 @@ CAlfNodeRoot* iRootNode; + #ifdef __WINS__ + TInt iDebug_CheckNodeTableItegrityCounter; + void Debug_CheckNodeTableItegrity(const TDesC16& aContext); + #endif + private: // variables RChunk iChunk; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Inc/alfnodes.h --- a/uiacceltk/hitchcock/ServerCore/Inc/alfnodes.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Inc/alfnodes.h Wed Apr 14 16:53:50 2010 +0300 @@ -224,6 +224,12 @@ return iTrackNode; } + #ifdef __WINS__ + void Debug_CheckSiblingOrder(const TDesC16& aContext); + #endif + +public: // Data + CAlfNode* iParent; CAlfNode* iChild; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Inc/alfstreamerbridge.h --- a/uiacceltk/hitchcock/ServerCore/Inc/alfstreamerbridge.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Inc/alfstreamerbridge.h Wed Apr 14 16:53:50 2010 +0300 @@ -192,7 +192,7 @@ }; -NONSHARABLE_CLASS(CAlfStreamerBridge): public CActive, public CHuiEnv::MHuiSwapObserver +NONSHARABLE_CLASS(CAlfStreamerBridge): public CActive { public: @@ -282,74 +282,44 @@ * @return Pointer to the data struct */ const TAny* GetVarDataL( TInt aIndex ); - - /** - * SetStreamerServer() - * - * Sets Streamserver instance. - */ - void SetStreamerServer( CAlfStreamerServer& aStreamerServer ); - /** - * StreamerServer() - * - * Gets Streamserver instance set with set functionality. - * @see SetStreamerServer() - */ - CAlfStreamerServer* StreamerServer(); - + /* deprecated */ IMPORT_C TUid FindAppUidForWgId(TInt aWgId); IMPORT_C TInt FindWgForAppUid(TUid aAppUid); + void SetObserver(MAlfStreamerListener* aObserver) + { + iObserver = aObserver; + } + public: // from CActive void RunL(); - void DoCancel(); -public: // from SwapObserver - void PrepareSwap(); - void SwapComplete(); - void ReleaseWindowServer(TBool aRelease = ETrue); - void SetWgIdArray(TInt* aArray); - private: - + + CAlfStreamerServer* iStreamerServer; MAlfStreamerListener* iObserver; - MAlfBatchObs* iBatchObserver; - TThreadId iThread; RArray iMessages; - RArray iQueue; RCriticalSection iQueueSema; RBuf8 iDataBuf; - - TInt iItemsInBuffer; + volatile TInt iItemsInBuffer; + volatile TBool iVarDataAddedButNotPosted; - RArray iFxMessages; - RArray iFxQueue; - RBuf8 iFxBuf; - TInt iFxItemsInBuffer; - - CAlfStreamerServer* iStreamerServer; #ifdef ALF_DEBUG_TRACK_DRAWING CAlfCommandDebug* iCommandDebugger; #endif - - volatile TBool iSwapActive; - volatile TBool iMakeCurrentActive; - TBool iFxQueueActive; - TInt* iWgArray; - TBool iVarDataAddedButNotPosted; public: - TAlfNativeWindowData iAlfWindowData; - + volatile TAlfNativeWindowData iAlfWindowData; + volatile TInt iActiveEffectCount; }; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Inc/alfstreamerconsts.h --- a/uiacceltk/hitchcock/ServerCore/Inc/alfstreamerconsts.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Inc/alfstreamerconsts.h Wed Apr 14 16:53:50 2010 +0300 @@ -42,7 +42,11 @@ EAlfPostDataToCompositionClient, EAlfPostDataToCompositionTarget, EAlfGetListOfWGsHavingInactiveSurfaces, - EAlfQueueRequestBGSessions + EAlfQueueRequestBGSessions, + EAlfGetNumberOfActiveEffects, + EAlfRequestSignal, + EAlfCompleteSignal + }; enum TAlfCompOps{ @@ -83,5 +87,13 @@ TInt iAlfWindowGrpId; TUint iAlfWindowHandle; }; + +/* bitfield*/ +enum TAlfSignalFlags + { + EAlfSignalEffectStarted = 0x1, + EAlfSignalEffectComplete = 0x2, + + }; #endif diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Inc/alfstreamerserver.h --- a/uiacceltk/hitchcock/ServerCore/Inc/alfstreamerserver.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Inc/alfstreamerserver.h Wed Apr 14 16:53:50 2010 +0300 @@ -73,7 +73,9 @@ void AddTargetFromInactiveSurfaces(TInt aTarget); void GetListOfWGsHavingInactiveSurfacesL(const RMessage2& aMessage, TBool aActiveAlso = ETrue); void QueueRequestBGAnimSessionsL(const TPtrC8& aPtr, TInt aOp); - + + void AddSignal(CAlfStreamerServerSession* aSession, const RMessage2& aMessage); + void CompleteSignal(TInt aSignal, TInt aType); private: void ConstructL(); @@ -88,7 +90,6 @@ TInt SearchCommonEntryForToken(const RMessage2& aMessage); CAlfStreamerServerSession* SearchSessionForToken(TInt aToken); - private: CAlfStreamerBridge* iBridge; // not owned mutable TUint iSessions; @@ -130,6 +131,16 @@ CAsyncCallBack * iRendezvous; + struct TAlfSignal + { + CAlfStreamerServerSession* iSession; + RMessagePtr2 iMessage; + TInt iHandle; + TInt iFlags; + }; + + RArray iSignals; + public: struct TAlfCompParams { diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Src/alfappsrvsession.cpp --- a/uiacceltk/hitchcock/ServerCore/Src/alfappsrvsession.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Src/alfappsrvsession.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -303,7 +303,7 @@ } else { - ShowControlGroupsInOrderL(*display); +// ShowControlGroupsInOrderL(*display); } // This is needed for Huitk BitBlit() to succeed @@ -437,9 +437,9 @@ } } -void CAlfAppSrvSession::ShowControlGroupsInOrderL(CHuiDisplay& aDisplay) +void CAlfAppSrvSession::ShowControlGroupsInOrderL(CHuiDisplay& /*aDisplay*/) { -#ifdef SYMBIAN_BUILD_GCE +/*#ifdef SYMBIAN_BUILD_GCE iControlGroupOrder.Reset(); // gather all the control groups that belong to this session for ( TInt g = 0 ; g < aDisplay.Roster().Count() ; g++ ) @@ -474,7 +474,7 @@ iControlGroupOrder.Remove(iControlGroupOrder.Count()-1); } } - iControlGroupOrder.Reset(); + iControlGroupOrder.Reset();*/ } void CAlfAppSrvSession::ReOrderControlGroupSessionsL( RPointerArray& aGroupSessions ) @@ -1238,7 +1238,8 @@ #ifdef SYMBIAN_BUILD_GCE - CHuiLayout* hostContainer = controlGroup.Control(0).ContainerLayout( NULL ); + CHuiLayout* hostContainer = controlGroup.Control(0).ContainerLayout( NULL ); + controlGroup.SetAcceptInput(EFalse); if(hostContainer) hostContainer->SetFlags(EHuiVisualFlagUnderOpaqueHint); #else diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Src/alfappui.cpp --- a/uiacceltk/hitchcock/ServerCore/Src/alfappui.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Src/alfappui.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -53,12 +53,12 @@ #include "alfshareddisplaycoecontrol.h" #include "alfuids.h" -#ifdef SYMBIAN_BUILD_GCE #include "alfbridge.h" #include "alfstreamerserver.h" #include "alfdecoderserverclient.h" #include "alfstreamerconsts.h" -#endif // #ifdef SYMBIAN_BUILD_GCE +#include "HuiFxEngine.h" +#include "alfstreamerconsts.h" // DISABLE this if you want to use the AHDemoApp layout switch. If this is enabled // and switch is done through AHDemoApp, the layout will be rotated too much. @@ -67,6 +67,31 @@ #define ALF_USE_EMULATOR_LAYOUT_SWITCH_BUTTON #endif +NONSHARABLE_CLASS(TAlfEffectObserver): public MHuiEffectObserver + { + public: + TAlfEffectObserver(volatile TInt* aEffectCount, CAlfBridge& aBridge):iEffectCount((TInt*)aEffectCount), iBridge(aBridge){} + void EffectAdded(CHuiFxEffect* aEffect) + { + if (iBridge.BridgerClient() && aEffect && aEffect->Handle()) + { + __ALFFXLOGSTRING1("Effect about to start 0x%x", aEffect->Handle()); + iBridge.BridgerClient()->SendBlind(EAlfCompleteSignal, TIpcArgs(aEffect->Handle(), EAlfSignalEffectStarted)); + } + (*iEffectCount)++; + } + void EffectComplete(CHuiFxEffect* aEffect) + { + if (iBridge.BridgerClient() && aEffect && aEffect->Handle()) + { + __ALFFXLOGSTRING1("Effect complete 0x%x", aEffect->Handle()); + iBridge.BridgerClient()->SendBlind(EAlfCompleteSignal, TIpcArgs(aEffect->Handle(), EAlfSignalEffectComplete)); + } + (*iEffectCount)--; + } + TInt* iEffectCount; + CAlfBridge& iBridge; + }; _LIT(KAlfEventThreadName,"alfevents"); NONSHARABLE_CLASS(CAlfEventCatcher): public CActive @@ -627,20 +652,22 @@ iEventAo->Cancel(); } delete iEventAo; // before session is being terminated + if (iHuiEnv && iHuiEnv->EffectsEngine()) + { + iHuiEnv->EffectsEngine()->SetObserver(0); + delete iAlfEffectObserver; // cannot exist if huienv was not present + } delete iHuiEnv; delete iSharedWindow; -#ifdef SYMBIAN_BUILD_GCE delete iBridgeObj; -#endif // #ifdef SYMBIAN_BUILD_GCE } TBool iAllClientsClosed; // Boolean flag indicating if non-fading of shared window is enabled or disabled. TBool iSharedWindowNonFading; -#ifdef SYMBIAN_BUILD_GCE CAlfBridge* iBridgeObj; CAlfStreamerBridge* iBridge; -#endif // #ifdef SYMBIAN_BUILD_GCE + TAlfEffectObserver* iAlfEffectObserver; RWindow* iPlainWindow; CHuiDisplay* iMainDisplay; CHuiDisplay* iTVDisplay; @@ -756,10 +783,6 @@ { // In NGA master scene graph role, // we must not close the server even there were no hitchcock app clients present -#ifndef SYMBIAN_BUILD_GCE - iData->iAllClientsClosed = ETrue; - CAknEnv::Static()->RunAppShutter(); -#endif // #ifdef SYMBIAN_BUILD_GCE } // --------------------------------------------------------------------------- @@ -868,11 +891,19 @@ iData->iPlainWindow->SetBackgroundColor(~0); } -#ifdef SYMBIAN_BUILD_GCE + iData->iBridge = CAlfStreamerBridge::NewL(0); + iData->iBridge->iAlfWindowData.iAlfWindowGrpId = mainWg.Identifier(); + iData->iBridge->iAlfWindowData.iAlfWindowHandle = iData->iPlainWindow->ClientHandle(); + iData->iBridge->iAlfWindowData.iScreenNumber = 0; // TBD multiple screen support iData->iBridgeObj = CAlfBridge::NewL( &iData->iBridge, iData->iHuiEnv ); iData->iBridgeObj->iAppUi = this; - + + iData->iBridge->SetObserver(iData->iBridgeObj); + + iData->iAlfEffectObserver = new (ELeave) TAlfEffectObserver(&iData->iBridge->iActiveEffectCount, *iData->iBridgeObj); + iData->iHuiEnv->EffectsEngine()->SetObserver(iData->iAlfEffectObserver); + if( !iData->iPlainWindow) { // Create default CAlfScreen already now to be able to show controlgroups early enough... @@ -898,16 +929,10 @@ } AppendDisplayOnSharedWindowL(*(iData->iBridgeObj->Display(0))); - - iData->iBridge = CAlfStreamerBridge::NewL(iData->iBridgeObj); - iData->iBridge->iAlfWindowData.iAlfWindowGrpId = mainWg.Identifier(); - iData->iBridge->iAlfWindowData.iAlfWindowHandle = iData->iPlainWindow->ClientHandle(); - iData->iBridge->iAlfWindowData.iScreenNumber = 0; // TBD multiple screen support - + TThreadId threadId; CAlfStreamerServer::LaunchServer(threadId, iData->iBridge); -#endif // #ifdef SYMBIAN_BUILD_GCE // Inform texture manager that env has been created. iData->iServer->TextureManager().HandleEnvCreateL( *iData->iHuiEnv ); @@ -1335,9 +1360,7 @@ // TInt CAlfAppUi::FirstAlfControlGroupIndex( TInt aScreenNumber ) { -#ifdef SYMBIAN_BUILD_GCE return iData->iBridgeObj->FirstAlfControlGroupIndex( aScreenNumber ); -#endif // #ifdef SYMBIAN_BUILD_GCE } // --------------------------------------------------------------------------- @@ -1346,9 +1369,7 @@ // TInt CAlfAppUi::LastAlfControlGroupIndex( TInt aScreenNumber ) { -#ifdef SYMBIAN_BUILD_GCE return iData->iBridgeObj->LastAlfControlGroupIndex( aScreenNumber ); -#endif // #ifdef SYMBIAN_BUILD_GCE } @@ -1358,10 +1379,8 @@ // void CAlfAppUi::ShowControlGroupL(CHuiRoster& aRoster, CHuiControlGroup& aGroup, TInt aWhere, TInt aScreenNumber ) { -#ifdef SYMBIAN_BUILD_GCE iData->iBridgeObj->ShowControlGroupL(aRoster, aGroup, aWhere, aScreenNumber); iData->iBridgeObj->HandleVisualVisibility( aScreenNumber ); -#endif // #ifdef SYMBIAN_BUILD_GCE } @@ -1458,9 +1477,14 @@ return iData->iBridgeObj->ReadPixels(aBitmap); } -void CAlfAppUi::SetAlfAppWindowGroup( TInt aID ) +void CAlfAppUi::SetAlfAppWindowGroup( TInt aId ) { - iData->iBridgeObj->SetWindowGroupAsAlfApp( aID ); + iData->iBridgeObj->SetWindowGroupAsAlfApp( aId ); + } + +void CAlfAppUi::RemoveAlfAppWindowGroup( TInt aId ) + { + iData->iBridgeObj->RemoveWindowGroupAsAlfApp( aId ); } CAlfAppSrvSessionBase* CAlfAppUi::SrvSessionForControlGroup(CHuiControlGroup& aGroup) diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Src/alfbridge.cpp --- a/uiacceltk/hitchcock/ServerCore/Src/alfbridge.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Src/alfbridge.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -150,6 +150,7 @@ // CAlfBridge::~CAlfBridge() { + iAlfNativeClientsWgIds.Close(); delete iOrphanStorage; delete iFadeEffectFile; iWindowHashArray.Close(); @@ -633,6 +634,8 @@ { if (iAlfScreens[aScreenNumber]->iDisplay) { + RemoveWindowGroupAsAlfApp(iAlfScreens[aScreenNumber]->iControlGroups[i].iClientWindowGroupId); + CHuiControlGroup* controlGroup = iAlfScreens[aScreenNumber]->iControlGroups[i].iControlGroup; CHuiControl& control = controlGroup->Control(0); CHuiLayout* layout = (CHuiLayout*)&control.Visual(0); @@ -753,6 +756,15 @@ // So that's why opaque flag is set to this layout. layout->SetFlag(EHuiVisualFlagOpaqueHint); + for( TInt i = 0 ; i < iAlfNativeClientsWgIds.Count() ; i++ ) + { + if(iAlfNativeClientsWgIds[i] == aClientWindowGroupId) + { + group->iAlfApp = ETrue; + break; + } + } + TAlfControlGroupEntry entry; entry.iControlGroup = group; entry.iWindowGroupNodeId = aWindowGroupNodeId; @@ -910,6 +922,14 @@ TBool move = EFalse; // indicates that controlgroup is already in the roster somewhere below the new index. for (TInt i=FirstAlfControlGroupIndex(aScreenNumber); iFlags() & EHuiVisualFlagUnderOpaqueHint) + { + // If the visual is inactive, we should skip it so that alf control + // group ordering would be correct + continue; + } + if (index == aWhere) { if( move ) @@ -971,7 +991,24 @@ TBool lSyncAlfAppAndAlfEventGroup = EFalse; if ( i>0 && aRoster.ControlGroup(i).iAlfApp && aRoster.ControlGroup(i-1).ResourceId() == iAlfWindowGroupNodeId && &aRoster.ControlGroup(i) != &aGroup) { - lSyncAlfAppAndAlfEventGroup = ETrue; + // we still need to check that there are no other alf client window groups on top. + // if one native alf application is embedding another native alf application, WServ + // seems to update wg chains so that the following check must be done + TInt u = i+1; + TBool clienWgFoundOntop =EFalse; + for(;u < aRoster.Count() - screen->FixedControlGroupCount(); u++) + { + if(aRoster.ControlGroup(u).iAlfApp) + { + clienWgFoundOntop = ETrue; + break; + } + } + + if(!clienWgFoundOntop) + { + lSyncAlfAppAndAlfEventGroup = ETrue; + } } aRoster.ShowL(aGroup, i); added = ETrue; @@ -1357,7 +1394,8 @@ TBool alfWindowGroupFoundVisible = EFalse; - + TBool alfClientWindowGroupVisible = EFalse; + AMT_SET_VALUE( iVisibleVisualCount, 0 ); // skip the topmost (effect) layer, start from floating sprite group @@ -1402,7 +1440,7 @@ { CHuiLayout* hostContainer = control.ContainerLayout( NULL ); TInt flags = hostContainer->Flags(); - if (!fullscreenCovered) + if (!fullscreenCovered || alfClientWindowGroupVisible) { // clear inactive flag if client has not made this controlgroup hidden if(!(flags&EHuiVisualFlagUnderOpaqueHint)) @@ -1418,6 +1456,7 @@ iTempRegion.AddRect(fullscreen); iTempRegion.Tidy(); fullscreenCovered = ETrue; + alfClientWindowGroupVisible = EFalse; // change flag so that we don't go in this branch again } else // else put as inactive { @@ -1462,14 +1501,49 @@ #endif } + // if native alf app is found visible we can assume it should cover whole screen with alfcontent + // this is for embedded native alf application cases. Otherwise chained window groups tend to + // flicker from time to time + if(!fullscreenCovered && controlgroup.iAlfApp) + { + alfClientWindowGroupVisible = ETrue; + } + + TBool subTreeCovered = EFalse; TBool hasLayers = EFalse; - TBool hasActiveVisualsInVisualTree = - HandleLayoutVisualVisibility( layout, controlgroup, control, - fullscreenCovered, fullscreen, screen, - subTreeCovered, hasLayers, IsVisualOpaque(*layout) ); + + TBool hasActiveVisualsInVisualTree(EFalse); + + //embedded native alf application assumes that it should cover whole screen with alfcontent + // it makes alfeventwindowgroup as inactive and fading is not done on alf content + // this call is exculsive for alfeventwindowgroup + if (alfClientWindowGroupVisible && (controlgroup.ResourceId() == iAlfWindowGroupNodeId)) + { + hasActiveVisualsInVisualTree = + HandleLayoutVisualVisibility( layout, controlgroup, control, + hasActiveVisualsInVisualTree, fullscreen, screen, + subTreeCovered, hasLayers, IsVisualOpaque(*layout),alfClientWindowGroupVisible ); + } + + else + { + hasActiveVisualsInVisualTree = + HandleLayoutVisualVisibility( layout, controlgroup, control, + fullscreenCovered, fullscreen, screen, + subTreeCovered, hasLayers, IsVisualOpaque(*layout) ); + } + + TBool hasFadeEffectsInVisualTree = (layout->CanvasFlags() & EHuiCanvasFlagExternalFadeExistsInsideVisualTree); + if(!fullscreenCovered && alfClientWindowGroupVisible) + { + iTempRegion.AddRect(fullscreen); + iTempRegion.Tidy(); + fullscreenCovered = ETrue; + } + // If root visuals effect is marked as opaque, then add whole screen area as covered. if (!fullscreenCovered) { @@ -1622,7 +1696,8 @@ CAlfScreen* aScreen, TBool& aSubtreeVisible, TBool& aHasVisualsWithLayers, - TBool aChildCanBeOpaque ) + TBool aChildCanBeOpaque, + TBool aOnlyForEmbeddedAlfApp) { TBool visualTreeActive = EFalse; TRect visualDisplayRect; @@ -1687,8 +1762,15 @@ ClipVisualRect(visualDisplayRect, aLayout->DisplayRect()); ClipVisualRect(visualDisplayRect, aFullscreen); - // Check if this visual is covered by other opaque visuals which rects are in "covered" region - visualRectIsCovered = IsRectCoveredByRegion(visualDisplayRect, iTempRegion); + + // Check if this visual is covered by other opaque visuals which rects are in "covered" region + // it should not check for alf event window group, when we have embedded alf application, + // because we have assumed that alf app will have full screen covered + if(!aOnlyForEmbeddedAlfApp) + { + visualRectIsCovered = IsRectCoveredByRegion(visualDisplayRect, iTempRegion); + } + } /* if ( layout->Effect() || canvasVisual->Effect() ) @@ -1787,7 +1869,9 @@ // if paintedareacount is exactly one or two, it means that the window // has background surface but no drawing commands TInt areaCount = canvasVisual->PaintedAreaCount(); - if (areaCount == 1 || areaCount == 2) + // special handling for camera... + TBool incamera = aControlGroup.SecureId() == 0x101f857a; + if (areaCount == 1 || areaCount == 2 || incamera) { TBool onlyFullScreenAreas = ETrue; for (TInt count = 0; count < areaCount; count++) @@ -1808,7 +1892,7 @@ // memory state. We want to do it like this as otherwise // we would be triggering for example background animation // on / off quite rapidly........ - if ( onlyFullScreenAreas ) + if ( onlyFullScreenAreas || incamera) { // Final test. Surface must not be ALF surface, but some other surface. CHuiControlGroup* alfControlGroup = FindControlGroupBySecureId( iAlfSecureId ); @@ -3246,8 +3330,11 @@ // this prevents windows appearing before their "effected" time if (!iEffectCleanupStack[effectIndex].iHideWhenFinished) { - // this is appear effect. Lets show it + // this is appear effect. Lets show it. if effect would be stopped + // by some other effect, then EHuiVisualFlagShouldBeShown assures the correct state + // after cleanup. aVisual->iOpacity.Set(KAlfVisualDefaultOpacity); + aVisual->SetFlag(EHuiVisualFlagShouldBeShown); } else { @@ -3262,7 +3349,10 @@ // will only break the "live view" if (iEffectCleanupStack[effectIndex].iCanDestroyOrHideImmediately && !aVisual->Effect()) { - aVisual->ClearFlags(EHuiVisualFlagShouldBeShown | EHuiVisualFlagShouldBeHidden); + aVisual->ClearFlags(EHuiVisualFlagShouldBeShown); + aVisual->SetFlag(EHuiVisualFlagShouldBeHidden); + //if effect would be stopped by some other effect, then EHuiVisualFlagShouldBeShown flag + // assures the correct state after cleanup. aVisual->iOpacity.Set(0.0f); } else @@ -4300,6 +4390,7 @@ TBool CAlfBridge::HandleGfxEventL(CFullScreenEffectState& aEvent, CHuiLayout* aToLayout, CHuiLayout *aFromLayout) { + __ALFFXLOGSTRING2("CAlfBridge::HandleGfxEventL - To SecureUid: 0x%x, From SecureUid: 0x%x", aEvent.iToSecureId, aEvent.iFromSecureId); __ALFFXLOGSTRING4("CAlfBridge::HandleGfxEventL - To layout: 0x%x, From layout: 0x%x, Effect handle: %d, Action: %d", aToLayout, aFromLayout, aEvent.iHandle, aEvent.iAction); TInt err = KErrNone; TBool failed = EFalse; @@ -4658,7 +4749,13 @@ RemoveEffectFromApp(iFullScreenEffectData->iFromSecureId, iFullScreenEffectData->iFromWg); // Fullscreen effect for another } - + + if (iFullScreenEffectData && iFullScreenEffectData->iToAppId != fxData->iToAppId) + { + // effected application has changed. Only single begin - end request supported at a time. + __ALFFXLOGSTRING2("CAlfBridge::HandleGfxEffectsL - Effect request has changed from appUid 0x%x to 0x%x. Cancel previous effect.", iFullScreenEffectData->iToAppId, fxData->iToAppId); + RemoveEffectFromApp(iFullScreenEffectData->iToAppId); + } delete iFullScreenEffectData; iFullScreenEffectData = fxData; iFullScreenEffectData->iAppStartScreenshotItemHandle = fxData->iHandle; @@ -5108,7 +5205,7 @@ } else { - __ALFFXLOGSTRING2("CAlfBridge::HandleGfxControlEffectsL - Control not found. iClientHandle 0x%x, iClientGroupHandle 0x%x", + __ALFFXLOGSTRING2("CAlfBridge::HandleGfxControlEffectsL - Control not found. iClientHandle %d, iClientGroupHandle %d", iControlEffectData->iClientHandle, iControlEffectData->iClientGroupHandle); return; @@ -5495,12 +5592,12 @@ // iFinishedCleanupStackEffects.Append(aHandle); if (!iEffectEndTimer->IsActive()) { - iEffectEndTimer->AddFinishedHandleL(aHandle); + TRAP_IGNORE(iEffectEndTimer->AddFinishedHandleL(aHandle)); iEffectEndTimer->Start(KEffectCleanupDelayInMs * 1000); } else { - iEffectEndTimer->AddFinishedHandleL(aHandle); + TRAP_IGNORE(iEffectEndTimer->AddFinishedHandleL(aHandle)); } // We should do visual visibility scan after effect is ended @@ -5730,8 +5827,8 @@ void CAlfBridge::PostQTCommandBufferL( TAlfQtCommandBufferParams params ) { CHuiCanvasVisual* huiVisual = NULL; - if ((*iHost)) - { +/* if ((*iHost)) + { if( (*iHost)->StreamerServer() ) { if ((*iHost)->StreamerServer()->WindowMgr()) @@ -5753,7 +5850,7 @@ } } } - +*/ if ( huiVisual ) { TPtrC8 commands( (TUint8 *)params.iPtr, params.iLength ); @@ -5787,10 +5884,10 @@ // visual // --------------------------------------------------------------------------- // -void CAlfBridge::SetClientWindowForDrawingL(TInt aWindowGroupId, TInt aClientWindowHandle, - CHuiVisual* aExternalContentVisual) +void CAlfBridge::SetClientWindowForDrawingL(TInt /*aWindowGroupId*/, TInt /*aClientWindowHandle*/, + CHuiVisual* /*aExternalContentVisual*/) { - RArray winInfoList; + /* RArray winInfoList; CleanupClosePushL(winInfoList); // Find canvas visual for the RWindow @@ -5843,7 +5940,7 @@ } CleanupStack::PopAndDestroy(); // winInfoList - } +*/ } void CAlfBridge::SetVisualTreeVisibilityChanged(TBool aChanged) { @@ -5982,9 +6079,9 @@ void CAlfBridge::DoUpdateMemoryLevel() { THuiMemoryLevel memoryLevel = iCurrentMemoryLevel; - if ( iLowMemoryMode && ( memoryLevel > EHuiMemoryLevelLow ) ) - { - memoryLevel = EHuiMemoryLevelLow; + if ( iLowMemoryMode && ( memoryLevel > EHuiMemoryLevelReduced ) ) + { + memoryLevel = EHuiMemoryLevelReduced; } if ( iForcedSwRendering && ( memoryLevel > EHuiMemoryLevelLowest ) ) { @@ -5995,9 +6092,10 @@ if ( memoryLevel != iHuiEnv->MemoryLevel() ) { + __ALFLOGSTRING1("CAlfBridge::DoUpdateMemoryLevel -> %d", memoryLevel); - TBool nowGoodMemory = !(memoryLevel < EHuiMemoryLevelNormal); - TBool wasGoodMemory = !(iHuiEnv->MemoryLevel() < EHuiMemoryLevelNormal); + TBool nowGoodMemory = !(memoryLevel < EHuiMemoryLevelReduced); + TBool wasGoodMemory = !(iHuiEnv->MemoryLevel() < EHuiMemoryLevelReduced); if (iActivated) { @@ -6130,7 +6228,39 @@ if ( lBreak ) break; } - + TBool alreadyExists = EFalse; + for( TInt i = 0 ; i < iAlfNativeClientsWgIds.Count() ; i++ ) + { + if(iAlfNativeClientsWgIds[i] == aId) + { + alreadyExists = ETrue; + } + } + if(!alreadyExists) + { + iAlfNativeClientsWgIds.Append(aId); + } + } + +void CAlfBridge::RemoveWindowGroupAsAlfApp( TInt aId ) + { + for ( TInt j = 0; j < iAlfScreens.Count(); j++ ) + { + for ( TInt i = 0; i < iAlfScreens[j]->iControlGroups.Count(); i++ ) + { + if ( iAlfScreens[j]->iControlGroups[i].iClientWindowGroupId == aId ) + { + iAlfScreens[j]->iControlGroups[i].iControlGroup->iAlfApp = EFalse; + } + } + } + for( TInt i = 0 ; i < iAlfNativeClientsWgIds.Count() ; i++ ) + { + if(iAlfNativeClientsWgIds[i] == aId) + { + iAlfNativeClientsWgIds.Remove(i); + } + } } // --------------------------------------------------------------------------- @@ -6449,4 +6579,14 @@ return iBridge.ReadPixels(aBitmap); } +RAlfBridgerClient* CAlfBridge::BridgerClient() + { + if (iActivated) + { + return &iBridgerClient; + } + return 0; + } + + // end of file diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Src/alfeffectutils.cpp --- a/uiacceltk/hitchcock/ServerCore/Src/alfeffectutils.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Src/alfeffectutils.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -658,7 +658,7 @@ // TBool CAlfLayoutSwitchEffectCoordinator::IsThemeEffectEnabled() const { - TBool memoryOk = !( iBridge.iHuiEnv->MemoryLevel() <= EHuiMemoryLevelLowest ); + TBool memoryOk = !( iBridge.iHuiEnv->MemoryLevel() <= EHuiMemoryLevelLow ); TBool tfxOn = CAknTransitionUtils::TransitionsEnabled(AknTransEffect::ELayoutswitchTransitionsOff ); TBool tfxExists = LayoutSwitchEffectsExist(); diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Src/alfhierarchymodel.cpp --- a/uiacceltk/hitchcock/ServerCore/Src/alfhierarchymodel.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Src/alfhierarchymodel.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -734,6 +734,14 @@ case MWsWindowTreeNode::EWinTreeNodeClient: { node = CAlfNodeWindow::NewL( this, iStream, iScreenNumber ); + + #ifdef __WINS__ + if (++iDebug_CheckNodeTableItegrityCounter > 100) // Do not check too often as is can be slow + { + Debug_CheckNodeTableItegrity(_L("CAlfHierarchyModel::DoNodeCreatedL")); + } + #endif + break; } case MWsWindowTreeNode::EWinTreeNodeRoot: @@ -1287,5 +1295,35 @@ } } } + + +#ifdef __WINS__ +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +void CAlfHierarchyModel::Debug_CheckNodeTableItegrity(const TDesC16& aContext) + { + iDebug_CheckNodeTableItegrityCounter = 0; + // Loop through the all items + TInt count = 0; + THashMapIter ptrHashSetIter(iNodeHashArray); + for ( ; ; ) + { + const CNodeHashStruct* resNext = ptrHashSetIter.NextValue(); + if (!resNext) + { + break; + } + count++; + if (resNext->iNode->Type() == MWsWindowTreeNode::EWinTreeNodeClient) + { + resNext->iNode->Debug_CheckSiblingOrder(aContext); + } + } + } +#endif + + diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Src/alfnodes.cpp --- a/uiacceltk/hitchcock/ServerCore/Src/alfnodes.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Src/alfnodes.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -1082,9 +1082,18 @@ // ^^^ // if iterNode gets to NULL, then we must have found both matches // - i.e. either the new or current/old position is the rightmost node - ASSERT(oldPrevNode!=NULL && newPrevNode!=NULL); + if (oldPrevNode == NULL || newPrevNode == NULL ) + { + // Fatal error! Node tree is corrupted. + __ALFLOGSTRING4("CAlfNode::SiblingOrderChanged(). Fatal error! Node tree is corrupted. oldPrevNode=0x%x, newPrevNode=0x%x, iterNodePosition=%d, aNewPos=%d", + oldPrevNode, newPrevNode, iterNodePosition, aNewPos); + __ALFLOGSTRING4("CAlfNode::SiblingOrderChanged(). This node=0x%x, type = %d, parent node=0x%x, parent type=%d", this, Type(), iParent, iParent->Type()); + __ALFLOGSTRING2("CAlfNode::SiblingOrderChanged(). This node id=0x%x, parent node id=0x%x", iId, iParent->iId); + __ASSERT_ALWAYS(EFalse, USER_INVARIANT()); + //__ASSERT_DEBUG(EFalse, USER_INVARIANT()); + return; + } } - ASSERT(iterPrevNode!=NULL); } // end while loop @@ -2214,5 +2223,50 @@ } } +#ifdef __WINS__ +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +void CAlfNode::Debug_CheckSiblingOrder(const TDesC16& aContext) + { + if (!iParent || Type() != MWsWindowTreeNode::EWinTreeNodeClient) + { + return; + } + + TBool foundMyself = EFalse; + TInt iterNodePosition = 0; + + // Search for myselk in iParent sibling list + for(CAlfNode* iterNode = iParent->iChild; iterNode != NULL; iterNode = iterNode->iSibling, iterNodePosition++) + { + if (iterNode == this) + { + foundMyself = ETrue; + } + } + + if(!foundMyself) + { + // Did not find myself from the parent sibling list ==> error! + __ALFLOGSTRING2("CAlfNode::Test_CheckSiblingOrder(). Fatal error! Node tree is corrupted. at %S: iId=0x%x", &aContext, iId ); + __ALFLOGSTRING3("CAlfNode::Test_CheckSiblingOrder(). iterNodePosition=%d, iChild=0x%x, iSibling=0x%x", iterNodePosition, iChild, iSibling ); + __ALFLOGSTRING3("CAlfNode::Test_CheckSiblingOrder(). iSpriteChild=0x%x, iAnimChild=0x%x, iTextCursor=0x%x", iSpriteChild, iAnimChild, iTextCursor ); + __ALFLOGSTRING4("CAlfNode::Test_CheckSiblingOrder(). This node=0x%x, type = %d, parent node=0x%x, parent type=%d", this, Type(), iParent, iParent->Type()); + // Print sibling list + iterNodePosition=0; + __ALFLOGSTRING("CAlfNode::Test_CheckSiblingOrder(). SIBLINGS:"); + for(CAlfNode* iterNode2 = iParent->iChild; iterNode2!=NULL; iterNode2 = iterNode2->iSibling, iterNodePosition++) + { + __ALFLOGSTRING4("CAlfNode::Test_CheckSiblingOrder(). *** iterNodePosition=%d, id=%d, this=0x%x, iChild=0x%x", iterNodePosition, iterNode2->iId, iterNode2, iterNode2->iChild ); + __ALFLOGSTRING3("CAlfNode::Test_CheckSiblingOrder(). iSpriteChild=0x%x, iAnimChild=0x%x, iTextCursor=0x%x", iterNode2->iSpriteChild, iterNode2->iAnimChild, iterNode2->iTextCursor ); + } + + __ASSERT_ALWAYS(EFalse, USER_INVARIANT()); + } + } +#endif + // end of file diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Src/alfsrvdisplaysubsession.cpp --- a/uiacceltk/hitchcock/ServerCore/Src/alfsrvdisplaysubsession.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Src/alfsrvdisplaysubsession.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -234,7 +234,16 @@ #endif } - + // if this is a last displaysubsession remove "alfnative client wg" tag from bridge + RPointerArray displays; + CleanupClosePushL( displays ); + Session().GetSubsessionsByTypeL( displays, EHuiObjectTypeDisplay ); + + if( displays.Count() == 0 ) + { + Session().AlfAppUi()->RemoveAlfAppWindowGroup(Session().ClientWindowGroup()); + } + CleanupStack::PopAndDestroy( &displays ); // displays.Close() } // --------------------------------------------------------------------------- diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Src/alfstreamerbridge.cpp --- a/uiacceltk/hitchcock/ServerCore/Src/alfstreamerbridge.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Src/alfstreamerbridge.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -21,6 +21,7 @@ #include #include "alfstreamerbridge.h" #include "alfstreamerserver.h" +#include "alfbridge.h" #include "alflogger.h" #ifdef ALF_DEBUG_TRACK_DRAWING @@ -28,7 +29,8 @@ #endif -// #define EGL_TALKS_TO_WINDOW_SERVER + +#define ALF_DRAW_FRAME_BEFORE_END_CALLBACK // --------------------------------------------------------------------------- // constructor @@ -83,7 +85,6 @@ #ifdef ALF_DEBUG_TRACK_DRAWING iCommandDebugger = CAlfCommandDebug::NewL(); #endif - CHuiEnv::Static()->iSwapObserver = this; } // --------------------------------------------------------------------------- @@ -93,7 +94,6 @@ // CAlfStreamerBridge::~CAlfStreamerBridge() { - CHuiEnv::Static()->iSwapObserver = 0; iDataBuf.Close(); iQueueSema.Close(); #ifdef ALF_DEBUG_TRACK_DRAWING @@ -173,21 +173,14 @@ // TInt CAlfStreamerBridge::AddData( TAlfDecoderServerBindings aOp,TInt aI1,TInt aI2 ,TAny* aPtr ) { - if (iSwapActive && aOp == EAlfRequestCommitBatch) - { - __ALFLOGSTRING("CAlfStreamerBridge::AddData() just release window server"); - iBatchObserver->BridgerCallback(KRELEASEWINDOWSERVER,KRELEASEDBEFOREQUEUE); - return KErrNone; - } - TInt err = KErrNotFound; { #ifdef ALF_DEBUG_TRACK_DRAWING iCommandDebugger->SetDescription( aOp, R_ALF_BRIDGE_COMMAND_DESCRIPTION_ARRAY ); __ALFLOGSTRING2("CAlfStreamerBridge::AddData op %S, iQueue.Length = %d", &iCommandDebugger->Text(), iQueue.Count()); - #else +#else __ALFLOGSTRING2("CAlfStreamerBridge::AddData op %d, iQueue.Length = %d", aOp, iQueue.Count()); - #endif +#endif err = KErrNone; for(TInt i = 0; i < iMessages.Count(); i++ ) { @@ -229,56 +222,6 @@ return data; } -void CAlfStreamerBridge::PrepareSwap() - { -#ifdef EGL_TALKS_TO_WINDOW_SERVER - __ALFLOGSTRING("CAlfStreamerBridge:: Prepare swap, flush the queue"); - iSwapActive = ETrue; - if (iStatus.Int() >=0 && iMessages.Count() > iStatus.Int() ) - { - Cancel(); // remove from scheduler - RunL(); // run manually (and activate) - } - __ALFLOGSTRING("CAlfStreamerBridge:: Prepare swap, the queue emptied"); -#endif //#ifdef EGL_TALKS_TO_WINDOW_SERVER - } - -void CAlfStreamerBridge::SwapComplete() - { -#ifdef EGL_TALKS_TO_WINDOW_SERVER - __ALFLOGSTRING("CAlfStreamerBridge:: Swap buffers complete"); - iSwapActive = EFalse; -#endif // #ifdef EGL_TALKS_TO_WINDOW_SERVER - - } - -#ifdef EGL_TALKS_TO_WINDOW_SERVER -void CAlfStreamerBridge::ReleaseWindowServer(TBool aRelease) - { - __ALFLOGSTRING1("CAlfStreamerBridge::ReleaseWindowServer: %d",aRelease); - if (aRelease) - { - iMakeCurrentActive = ETrue; - if (iBatchObserver && !iSwapActive) - { - iBatchObserver->BridgerCallback(KRELEASEWINDOWSERVER); - } - } - else - { - iMakeCurrentActive = EFalse; - } -#else -void CAlfStreamerBridge::ReleaseWindowServer(TBool) - { -#endif - } - -void CAlfStreamerBridge::SetWgIdArray(TInt* aArray) - { - iWgArray = aArray; - } - EXPORT_C TUid CAlfStreamerBridge::FindAppUidForWgId(TInt /*aWgId*/) { __ASSERT_DEBUG(EFalse, User::Leave(KErrNotSupported)); @@ -308,8 +251,16 @@ #endif switch ( operation ) { - // Just call back to Alf decoder thread case EAlfRequestCommitBatch: +#ifdef ALF_DRAW_FRAME_BEFORE_END_CALLBACK + { + CAlfBridge* bridge = dynamic_cast(iObserver); + if (bridge) + { + bridge->iHuiEnv->RefreshCallBack((TAny*)bridge->iHuiEnv); + } + } // fall through +#endif case EAlfRequestCommandReadNotification: case EAlfReleaseTemporaryChunk: { @@ -324,6 +275,7 @@ { // Handle command __ALFLOGSTRING("CAlfStreamerBridge:: calling observer callback"); + __ASSERT_ALWAYS(iObserver, User::Invariant()); iObserver->HandleCallback(iStatus.Int()); // For "getters" also call back to Alf decoder thread @@ -368,6 +320,7 @@ { // Handle command __ALFLOGSTRING("CAlfStreamerBridge:: calling observer callback"); + __ASSERT_ALWAYS(iObserver, User::Invariant()); iObserver->HandleCallback(iQueue[0]); // For "getters" also call back to Alf decoder thread @@ -416,13 +369,7 @@ { // Queue marker. Basically we could use one new member to assert that there can // be only one marker - __ALFLOGSTRING1("CAlfStreamerBridge:: Request command read notification, swap active: %d", iSwapActive ); - if ( iSwapActive || iMakeCurrentActive ) - { - __ALFLOGSTRING("CAlfStreamerBridge::StartNewBlock() just release window server"); - iBatchObserver->BridgerCallback(KRELEASEWINDOWSERVER,KRELEASEDBEFOREQUEUE); - return; - } + //__ALFLOGSTRING1("CAlfStreamerBridge:: Request command read notification, swap active: %d", iSwapActive ); AddData(EAlfRequestCommitBatch,0,0,0); } @@ -503,21 +450,3 @@ { return GetVarDataL(aIndex); } - -// --------------------------------------------------------------------------- -// SetStreamerServer -// --------------------------------------------------------------------------- -// -void CAlfStreamerBridge::SetStreamerServer( CAlfStreamerServer& aStreamerServer ) - { - iStreamerServer = &aStreamerServer; - } - -// --------------------------------------------------------------------------- -// StreamerServer -// --------------------------------------------------------------------------- -// -CAlfStreamerServer* CAlfStreamerBridge::StreamerServer() - { - return iStreamerServer; - } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/ServerCore/Src/alfstreamerserver.cpp --- a/uiacceltk/hitchcock/ServerCore/Src/alfstreamerserver.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/ServerCore/Src/alfstreamerserver.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -149,7 +149,6 @@ iWindowHierarcy = CAlfHierarchyModel::NewL(*this); iWindowMgr = CAlfWindowManager::NewL(iWindowHierarcy); - iBridge->SetStreamerServer( *this ); iThemesListener = CThemeRepositoryListener::NewL(); iThemesListener->IssueRequest(); iRendezvous = new (ELeave) CAsyncCallBack(EPriorityHigh*3); @@ -199,6 +198,16 @@ { WindowMgr()->HandleClientExit(aClient->ThreadId()); } + + for (TInt i = iSignals.Count()-1; i >= 0 ; i--) + { + if (iSignals[i].iSession == aClient) + { + // Don't complete because client is already being deleted + iSignals.Remove(i); + } + } + if (!iSessions) { // CActiveScheduler::Stop(); // TODO: lets not die, if client dies. @@ -692,6 +701,28 @@ __ALFLOGSTRING("CAlfStreamerServer::GetListOfWGsHavingInactiveSurfacesL <<") } +void CAlfStreamerServer::AddSignal(CAlfStreamerServerSession* aSession, const RMessage2& aMessage) + { + TAlfSignal signal = { aSession, aMessage, aMessage.Int0(), aMessage.Int1()}; + if (iSignals.Append(signal)) + { + aMessage.Complete(KErrNoMemory); + } + } + +void CAlfStreamerServer::CompleteSignal(TInt aSignal, TInt aType) + { + for (TInt i = iSignals.Count()-1; i >= 0 ; i--) + { + if (iSignals[i].iHandle == aSignal && (iSignals[i].iFlags & aType)) + { + iSignals[i].iMessage.Complete(iSignals[i].iHandle); + iSignals.Remove(i); + //break; + } + } + } + // --------------------------------------------------------------------------- // constructor // --------------------------------------------------------------------------- @@ -846,7 +877,7 @@ } case EAlfGetNativeWindowHandles: { - TPckgC data(server->Bridge()->iAlfWindowData); + TPckgC data(server->Bridge()->iAlfWindowData); aMessage.WriteL(0, data); break; } @@ -907,7 +938,7 @@ } case EAlfGetListOfWGsHavingInactiveSurfaces: { - server->GetListOfWGsHavingInactiveSurfacesL(aMessage, EFalse); + server->GetListOfWGsHavingInactiveSurfacesL(aMessage, aMessage.Int1()); break; } @@ -930,8 +961,24 @@ } break; } - - + case EAlfGetNumberOfActiveEffects: + { + if (server->Bridge()) // though always there + { + aMessage.Complete(server->Bridge()->iActiveEffectCount); + } + break; + } + case EAlfRequestSignal: + { + server->AddSignal(this, aMessage); + return; + } + case EAlfCompleteSignal: + { + server->CompleteSignal(aMessage.Int0(), aMessage.Int1()); + break; + } default: { aMessage.Complete(KErrNotSupported); diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/backgroundanim/inc/bganimhost.h --- a/uiacceltk/hitchcock/backgroundanim/inc/bganimhost.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/backgroundanim/inc/bganimhost.h Wed Apr 14 16:53:50 2010 +0300 @@ -111,4 +111,5 @@ RAknsSrvSession iSkinSrv; HBufC* iCurrentPluginDllName; HBufC* iCurrentPluginAssetDir; + TBool iIsUIReady; }; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/backgroundanim/src/bganimhost.cpp --- a/uiacceltk/hitchcock/backgroundanim/src/bganimhost.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/backgroundanim/src/bganimhost.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -21,7 +21,7 @@ #include #include "bganimhost.h" - +#include typedef void* (*plugingetinterfacefunc)(int); @@ -31,7 +31,7 @@ static const TUint KMaxGPUMemUsage = 1024*1024*4; -CBgAnimHost::CBgAnimHost() +CBgAnimHost::CBgAnimHost():iIsUIReady(EFalse) { } @@ -516,6 +516,19 @@ { return; } + if (!iIsUIReady) + { + TInt lValOfNoUse; + TInt err = RProperty::Get( KPSUidStartup, + KPSStartupUiPhase, + lValOfNoUse); + if (err == KErrNotFound) + { + iTimer->CallBack(1); + return; + } + } + iIsUIReady = ETrue; TTime start; start.UniversalTime(); iPlugin->produceframe(); diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/BWINS/hitchcocku.DEF --- a/uiacceltk/hitchcock/coretoolkit/BWINS/hitchcocku.DEF Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/BWINS/hitchcocku.DEF Wed Apr 14 16:53:50 2010 +0300 @@ -1390,7 +1390,7 @@ ??1CHuiFxEngine@@UAE@XZ @ 1389 NONAME ; CHuiFxEngine::~CHuiFxEngine(void) ?RegisterParameterL@CHuiFxVisualLayer@@IAEXABVTDesC16@@PAM@Z @ 1390 NONAME ; void CHuiFxVisualLayer::RegisterParameterL(class TDesC16 const &, float *) ?NewL@CHuiFxEffect@@SAPAV1@AAVCHuiFxEngine@@@Z @ 1391 NONAME ; class CHuiFxEffect * CHuiFxEffect::NewL(class CHuiFxEngine &) - ?ConstructL@CHuiFxVisualLayer@@IAEXAAVMHuiEffectable@@@Z @ 1392 NONAME ; void CHuiFxVisualLayer::ConstructL(class CHuiVisual &) + ?ConstructL@CHuiFxVisualLayer@@IAEXPAVMHuiEffectable@@@Z @ 1392 NONAME ; void CHuiFxVisualLayer::ConstructL(class MHuiEffectable *) ?Draw@CHuiFxEffect@@QAEHAAVCHuiGc@@ABVTRect@@@Z @ 1393 NONAME ; int CHuiFxEffect::Draw(class CHuiGc &, class TRect const &) ?TargetRect@CHuiFxLayer@@QBEABVTRect@@XZ @ 1394 NONAME ; class TRect const & CHuiFxLayer::TargetRect(void) const ?AdvanceTime@CHuiFxVisualLayer@@UAEXM@Z @ 1395 NONAME ; void CHuiFxVisualLayer::AdvanceTime(float) @@ -1428,7 +1428,7 @@ ?AdvanceTime@CHuiFxLayer@@UAEXM@Z @ 1427 NONAME ; void CHuiFxLayer::AdvanceTime(float) ?SetEffectEndObserver@CHuiFxEffect@@QAEXPAVMAlfGfxEffectObserver@@H@Z @ 1428 NONAME ; void CHuiFxEffect::SetEffectEndObserver(class MAlfGfxEffectObserver *, int) ?BufferType@CHuiFxRenderbuffer@@QBEABW4TRenderBufferType@@XZ @ 1429 NONAME ; enum TRenderBufferType const & CHuiFxRenderbuffer::BufferType(void) const - ?NewL@CHuiFxVisualLayer@@SAPAV1@AAVMHuiEffectable@@@Z @ 1430 NONAME ; class CHuiFxVisualLayer * CHuiFxVisualLayer::NewL(class CHuiVisual &) + ?NewL@CHuiFxVisualLayer@@SAPAV1@PAVMHuiEffectable@@@Z @ 1430 NONAME ; class CHuiFxVisualLayer * CHuiFxVisualLayer::NewL(class MHuiEffectable *) ?RegisterParameterL@CHuiFxVisualLayer@@IAEXABVTDesC16@@PAVTRgb@@@Z @ 1431 NONAME ; void CHuiFxVisualLayer::RegisterParameterL(class TDesC16 const &, class TRgb *) ?SetVisualRect@CHuiFxLayer@@QAEXABVTRect@@@Z @ 1432 NONAME ; void CHuiFxLayer::SetVisualRect(class TRect const &) ?SetVisualRect@CHuiFxFilter@@QAEXABVTRect@@@Z @ 1433 NONAME ; void CHuiFxFilter::SetVisualRect(class TRect const &) diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/eabi/hitchcocku.DEF --- a/uiacceltk/hitchcock/coretoolkit/eabi/hitchcocku.DEF Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/eabi/hitchcocku.DEF Wed Apr 14 16:53:50 2010 +0300 @@ -1785,14 +1785,14 @@ _ZN17CHuiFxFilterLayer11AdvanceTimeEf @ 1784 NONAME _ZN17CHuiFxFilterLayer12PrepareDrawLER12CHuiFxEngine @ 1785 NONAME _ZN17CHuiFxFilterLayer4DrawER12CHuiFxEngineR6CHuiGcR18CHuiFxRenderbufferS5_ @ 1786 NONAME - _ZN17CHuiFxVisualLayer10ConstructLER14MHuiEffectable @ 1787 NONAME + _ZN17CHuiFxVisualLayer10ConstructLEP14MHuiEffectable @ 1787 NONAME _ZN17CHuiFxVisualLayer10VisualAreaER5TRect @ 1788 NONAME _ZN17CHuiFxVisualLayer11AdvanceTimeEf @ 1789 NONAME _ZN17CHuiFxVisualLayer12PrepareDrawLER12CHuiFxEngine @ 1790 NONAME _ZN17CHuiFxVisualLayer18RegisterParameterLERK7TDesC16P4TRgb @ 1791 NONAME _ZN17CHuiFxVisualLayer18RegisterParameterLERK7TDesC16Pf @ 1792 NONAME _ZN17CHuiFxVisualLayer4DrawER12CHuiFxEngineR6CHuiGcR18CHuiFxRenderbufferS5_ @ 1793 NONAME - _ZN17CHuiFxVisualLayer4NewLER14MHuiEffectable @ 1794 NONAME + _ZN17CHuiFxVisualLayer4NewLEP14MHuiEffectable @ 1794 NONAME _ZN17CHuiFxVisualLayer9ParameterERK7TDesC16 @ 1795 NONAME _ZN17CHuiFxVisualLayerD0Ev @ 1796 NONAME _ZN17CHuiFxVisualLayerD1Ev @ 1797 NONAME diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/inc/HuiFxEffect.h --- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEffect.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEffect.h Wed Apr 14 16:53:50 2010 +0300 @@ -153,6 +153,11 @@ TBool CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque); void FxmlVisualInputs(RArray &aArray); + + TInt Handle() const + { + return iHandle; + } private: TBool IsAppliedToBackground(); @@ -183,6 +188,8 @@ TInt iGroupId; TInt iFramesDrawn; + TReal32 iElapsedTime; + TBool iNotifiedEffectReady; }; #endif /*HUIFXEFFECT_H_*/ diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/inc/HuiFxEngine.h --- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEngine.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEngine.h Wed Apr 14 16:53:50 2010 +0300 @@ -39,6 +39,13 @@ class MAlfGfxEffectObserver; class CHuiGc; +class MHuiEffectObserver + { + public: + virtual void EffectAdded(CHuiFxEffect* aEffect) = 0; + virtual void EffectComplete(CHuiFxEffect* aEffect) = 0; + }; + class CHuiFxEngine : public CBase, public MHuiLowMemoryObserver, public MHuiMemoryLevelObserver { // important constant! Affects memory fragmentation in backend too small @@ -140,6 +147,7 @@ TInt LowMemoryState(); TBool HasActiveEffects() const; + TBool HasActiveFadeEffect() const; void ClearCache(); @@ -147,6 +155,11 @@ IMPORT_C void SetMemoryLevel(THuiMemoryLevel aLevel); + void SetObserver(MHuiEffectObserver* aObserver) + { + iEffectObserver = aObserver; + } + /** * Group effects wait until each effect has been drawn once. * @@ -214,6 +227,8 @@ * Only one simultanious effect group is supported */ RArray iActiveEffectGroups; + + MHuiEffectObserver* iEffectObserver; }; #endif /*HUIFXENGINE_H_*/ diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/inc/HuiFxLayer.h --- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxLayer.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxLayer.h Wed Apr 14 16:53:50 2010 +0300 @@ -78,7 +78,7 @@ // Internal flag to tell wheter transparency is enabled virtual TBool IsSemitransparent() const; - virtual void FxmlVisualInputs(RArray &aArray) { } + virtual void FxmlVisualInputs(RArray & /*aArray*/) { } TBool AlwaysReadSurfacePixels() const; virtual void SetAlwaysReadSurfacePixels(TBool aAlwaysReadSurfacePixels); diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/inc/HuiFxParameter.inl --- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxParameter.inl Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxParameter.inl Wed Apr 14 16:53:50 2010 +0300 @@ -221,7 +221,7 @@ template void CHuiFxGenericParameter::AdvanceTime(TReal32 aElapsedTime) { - if (!iTimeLine) + if (!iTimeLine || iAnimationFinished) { return; } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/inc/HuiFxVisualLayer.h --- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxVisualLayer.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxVisualLayer.h Wed Apr 14 16:53:50 2010 +0300 @@ -29,7 +29,7 @@ class CHuiFxVisualLayer: public CHuiFxLayer { public: - IMPORT_C static CHuiFxVisualLayer* NewL(MHuiEffectable& aVisual); + IMPORT_C static CHuiFxVisualLayer* NewL(MHuiEffectable* aVisual); // param mandatory IMPORT_C ~CHuiFxVisualLayer(); IMPORT_C TBool PrepareDrawL(CHuiFxEngine& aEngine); IMPORT_C void Draw(CHuiFxEngine& aEngine, CHuiGc& aGc, CHuiFxRenderbuffer& aTarget, CHuiFxRenderbuffer& aSource); @@ -52,7 +52,7 @@ void FxmlVisualInputs(RArray &aArray); protected: - IMPORT_C void ConstructL(MHuiEffectable& aVisual); + IMPORT_C void ConstructL(MHuiEffectable* aVisual); void RegisterParameterL(const TDesC& aName, TRgb* aValue); void RegisterParameterL(const TDesC& aName, TReal32* aValue); diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiVg10Gc.h --- a/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiVg10Gc.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiVg10Gc.h Wed Apr 14 16:53:50 2010 +0300 @@ -385,7 +385,7 @@ */ void SetPaintPattern(CHuiTexture* aTexture, const TPoint& aTextureOrigin); - void DrawArc(const TRect& aRect, THuiFillMode aDrawMode, const TInt aThickness, TReal32 aStart, TReal32 aEnd, TBool aIsPie); + void DrawArc(const TRect& aRect, THuiFillMode aDrawMode, const TInt aThickness, TReal32 aStart, TReal32 aEnd, TBool aIsPie) __SOFTFP; protected: @@ -482,7 +482,7 @@ TReal32 aBorderWidth, TReal32 aBorderHeight, THuiRealPoint aOffset, - const THuiImage* aImage); + const THuiImage* aImage) __SOFTFP; /** diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Gc.cpp --- a/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Gc.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Gc.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -1555,7 +1555,7 @@ } -void CHuiVg10Gc::DrawArc(const TRect& aRect, THuiFillMode aDrawMode, const TInt aThickness, TReal32 aStart, TReal32 aEnd, TBool aIsPie) +void CHuiVg10Gc::DrawArc(const TRect& aRect, THuiFillMode aDrawMode, const TInt aThickness, TReal32 aStart, TReal32 aEnd, TBool aIsPie) __SOFTFP { // Fix given destination rect to be in th middle of openvg pixels THuiRealRect destinationRect = aRect; @@ -1759,7 +1759,7 @@ TReal32 aBorderWidth, TReal32 aBorderHeight, THuiRealPoint aOffset, - const THuiImage* aImage) + const THuiImage* aImage) __SOFTFP { // If there is no image, draw a solid border if (!aImage || !aImage->HasTexture()) diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/src/HuiCanvasTextureCache.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/HuiCanvasTextureCache.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/src/HuiCanvasTextureCache.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -3170,7 +3170,7 @@ for(TInt i=entries.Count() - 1; i >= 0; i--) { - if (iCachedRenderBuffers[i]->iCanvasRenderBuffer) + if (entries[i]->iCanvasRenderBuffer) { TSize renderBufferSize = entries[i]->iCanvasRenderBuffer->Size(); totalUnusedRenderBufferBytes += renderBufferSize.iWidth * renderBufferSize.iHeight * KHuiCanvasRenderBufferEstimatedBpp/8.f; @@ -3473,6 +3473,25 @@ delete entry; } } + else if(iMemoryLevel <= EHuiMemoryLevelReduced) + { + // free all the caches but allow using renderbuffers + #ifdef HUI_DEBUG_PRINT_PERFORMANCE_INTERVAL + RDebug::Print(_L("-- CHuiCanvasTextureCache::SetMemoryLevel: Enabling recuded memory state")); + RDebug::Print(_L("-- CHuiCanvasTextureCache::SetMemoryLevel: Caching of textures disabled but renderbuffers enabled")); + #endif + // Set cache sizes to minimum + iMaxTextureMemoryInKBytes = 0; + iMaxRenderBufferMemoryInKBytes = 0; + + // Set flags to make sure we check all entries + iHasReleasedTexts = ETrue; + iHasReleasedImages = ETrue; + iHasReleasedRenderBuffers = ETrue; + + // Delete released cached entries + DeleteAllReleasedEntries(EFalse); + } else { #ifdef HUI_DEBUG_PRINT_PERFORMANCE_INTERVAL diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/src/HuiDisplay.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/HuiDisplay.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/src/HuiDisplay.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -754,6 +754,21 @@ iGc->SetPenColor(iBackgroundColor); iGc->InitNewFrame(); + + // if there is a fade effect in progress, we + // need to clear the screen as fade effect uses + // always blending. If we do not clear here + // fade leaves trails in certain situations. + if (iEnv.EffectsEngine()->HasActiveFadeEffect()) + { + iGc->SetPenColor(KRgbBlack); + iGc->SetPenAlpha(0); + iGc->Disable(CHuiGc::EFeatureClipping); + iGc->Disable(CHuiGc::EFeatureBlending); + iGc->Clear(); + } + + if ( iDrawDirtyRegions ) { // Show dirty. @@ -1041,6 +1056,12 @@ iClearBackground = aClearBackground; iBackgroundItems.Reset(); + + // release background texture if clearing is set to None + if(aClearBackground == EClearNone) + { + iEnv.Skin().ReleaseTexture(EHuiSkinBackgroundTexture); + } } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/src/HuiFxEffect.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffect.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffect.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -76,16 +76,17 @@ { delete iRoot; iRoot = NULL; - NotifyEffectEndObserver(); ReleaseCachedRenderTarget(); iEngine->RemoveEffect(this); - if (iEngine && iGroupId != KErrNotFound) + if (iEngine && iGroupId != KErrNotFound && !iNotifiedEffectReady) { // if effect was deleted before it was drawn, the group must be notified. If this was the last effect in the group // the group will be removed by the EffectReadyToStart + // effect group does not not know, which effects have notified about themselves. thus iNotifiedEffectReady flag is used. + iNotifiedEffectReady = ETrue; iEngine->NotifyEffectReady(iGroupId); } @@ -96,12 +97,18 @@ void CHuiFxEffect::NotifyEffectEndObserver() { - if ( iEffectEndObserver ) + // fade effect should not have observers + if (iFlags & KHuiFadeEffectFlag) + { + return; + } + if (iEffectEndObserver) { // The callback can be called only once when the effect finishes - iEffectEndObserver->AlfGfxEffectEndCallBack( iHandle ); + MAlfGfxEffectObserver* effectEndObserver = iEffectEndObserver; iEffectEndObserver = NULL; - iHandle = 0; + // Note: The call below may synchronously delete me (CHuiFxEffect instance) + effectEndObserver->AlfGfxEffectEndCallBack( iHandle ); } } @@ -443,7 +450,11 @@ EXPORT_C void CHuiFxEffect::SetEffectEndObserver( MAlfGfxEffectObserver* aEffectEndObserver, TInt aHandle ) { iEffectEndObserver = aEffectEndObserver; - iHandle = aHandle; + + if (aHandle != 0) // override handle only if someone is interested + { + iHandle = aHandle; + } } EXPORT_C void CHuiFxEffect::SetEffectFlags( TInt aFlags ) @@ -453,11 +464,17 @@ void CHuiFxEffect::SetEffectFlag( TInt aFlag ) { +#ifdef HUIFX_TRACE + RDebug::Printf("CHuiFxEffect::SetEffectFlag - Setting flag 0x%x for 0x%x, before: iFlags: 0x%x", aFlag, this, iFlags); +#endif iFlags |= aFlag; } void CHuiFxEffect::ClearEffectFlag( TInt aFlag ) { +#ifdef HUIFX_TRACE + RDebug::Printf("CHuiFxEffect::ClearEffectFlag - Clearing flag 0x%x for 0x%x, before: iFlags: 0x%x", aFlag, this, iFlags); +#endif iFlags &= ~aFlag; } @@ -478,8 +495,31 @@ EXPORT_C void CHuiFxEffect::AdvanceTime(TReal32 aElapsedTime) { +#ifdef HUIFX_TRACE + RDebug::Printf("CHuiFxEffect::AdvanceTime 0x%x, aElapsed time: %f, Total elapsed time: %f, Frames drawn: %d, iFlags: 0x%x, iGroup %d, iHandle: %d", + this, + aElapsedTime, + iElapsedTime, + iFramesDrawn, + iFlags, + iGroupId, + iHandle); +#endif + // KHuiFxDelayRunUntilFirstFrameHasBeenDrawn flag is for giving effect chance to run + // its whole timeline by starting the time only when first frame has been drawn. + iElapsedTime += aElapsedTime; if (iFlags & KHuiFxDelayRunUntilFirstFrameHasBeenDrawn) { + // Sometimes the effect does not get any frames. Force the time to start, because + // otherwise will jam itself and possible the group, where the effect is. + if (iElapsedTime > 0.2 && iFramesDrawn == 0) + { + iFramesDrawn = 1; +#ifdef HUIFX_TRACE + RDebug::Printf("CHuiFxEffect::AdvanceTime - Not drawn, but cannot wait. release 0x%x in time %f", this, iElapsedTime); +#endif + } + if (iFramesDrawn) { if (iFlags & KHuiFxReadyAndWaitingGroupToStartSyncronized) @@ -491,11 +531,12 @@ if (iFlags & KHuiFxWaitGroupToStartSyncronized) { // Group has been started, waiting the others in the group to be drawn + ClearEffectFlag(KHuiFxWaitGroupToStartSyncronized); SetEffectFlag(KHuiFxReadyAndWaitingGroupToStartSyncronized); - ClearEffectFlag(KHuiFxWaitGroupToStartSyncronized); // NotifyEffectReady will clear KHuiFxReadyAndWaitingGroupToStartSyncronized flag // if all items in the group are ready. iEngine->NotifyEffectReady(iGroupId); + iNotifiedEffectReady = ETrue; return; } @@ -504,7 +545,6 @@ aElapsedTime = 0; iFramesDrawn++; } - iRoot->AdvanceTime(aElapsedTime); } } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/src/HuiFxEffectParser.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffectParser.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffectParser.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -345,7 +345,7 @@ #endif TPtrC16 extBitmap; THuiFxVisualSrcType srcType = GetSrcTypeL( aNode, extBitmap ); - CHuiFxVisualLayer* visual = CHuiFxVisualLayer::NewL( *iVisual ); + CHuiFxVisualLayer* visual = CHuiFxVisualLayer::NewL( iVisual ); CleanupStack::PushL( visual ); visual->SetSourceType( srcType ); if ( srcType == EVisualSrcBitmap && extBitmap.Length() > 0 ) diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/src/HuiFxEngine.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxEngine.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxEngine.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -16,7 +16,6 @@ */ - #include "HuiFxEngine.h" #include "HuiFxEffectParser.h" #include "HuiFxEffect.h" @@ -283,8 +282,11 @@ for ( TInt i = iActiveEffects.Count() - 1; i >= 0; i-- ) { CHuiFxEffect* effect = iActiveEffects[i]; - if (!effect->Changed()) + if (!(effect->EffectFlags() & KHuiFadeEffectFlag) && !effect->Changed()) { +#ifdef HUIFX_TRACE + RDebug::Printf("void CHuiFxEngine::NotifyEffectEndObservers() calling NotifyEffectEndObserver"); +#endif effect->NotifyEffectEndObserver(); } } @@ -296,7 +298,7 @@ TInt i; TBool refreshRequired = EFalse; #ifdef HUIFX_TRACE - RDebug::Print(_L("CHuiFxEngine::AdvanceTime - 0x%x "), this); + RDebug::Print(_L("CHuiFxEngine::AdvanceTime - 0x%x, effect count: %d"), this, iActiveEffects.Count()); #endif // Go through the list in reverse order. // If the effect has ended, and has the callback set, @@ -312,8 +314,10 @@ refreshRequired = ETrue; } TInt flags = effect->EffectFlags(); - if ( !(flags & KHuiFxWaitGroupSyncronization) - && (skipGroup == KErrNotFound || skipGroup != effect->GroupId())) + if ( !(flags & KHuiFxWaitGroupSyncronization) + && !(flags & KHuiFadeEffectFlag) // fade is not animated. Note, if animated effect would be used, remove this! + && (skipGroup == KErrNotFound || skipGroup != effect->GroupId()) + ) { // The effect is still in its place, it did not go away yet TBool waitingGroupBefore = flags & KHuiFxWaitGroupToStartSyncronized; @@ -348,6 +352,10 @@ #endif // #ifdef HUIFX_TRACE iActiveEffects.AppendL(aEffect); + if (iEffectObserver) + { + iEffectObserver->EffectAdded(aEffect); + } } EXPORT_C void CHuiFxEngine::RemoveEffect(CHuiFxEffect* aEffect) @@ -359,6 +367,10 @@ if (i >= 0) { iActiveEffects.Remove(i); + if (iEffectObserver) + { + iEffectObserver->EffectComplete(aEffect); + } } } @@ -505,7 +517,7 @@ ASSERT((aBuffer) && (iBuffersInUse > 0)); #ifdef HUIFX_RBCACHE_ENABLED - if(iLowGraphicsMemoryMode || IsCacheFull()) + if(iLowGraphicsMemoryMode < EHuiMemoryLevelReduced || IsCacheFull()) { #ifdef HUIFX_TRACE RDebug::Print(_L("CHuiFxEngine::ReleaseRenderbuffer() --- Renderbuffer cache full! Suspectible for memory fragmentation! Cache size is %d entries."), CACHE_SIZE); @@ -588,7 +600,7 @@ EXPORT_C void CHuiFxEngine::SetMemoryLevel(THuiMemoryLevel aLevel) { iLowGraphicsMemoryMode = aLevel; - if(iLowGraphicsMemoryMode) // != Normal + if(iLowGraphicsMemoryMode < EHuiMemoryLevelReduced) { ClearCache(); } @@ -601,19 +613,37 @@ TInt CHuiFxEngine::LowMemoryState() { - return iLowGraphicsMemoryMode; + return iLowGraphicsMemoryMode < EHuiMemoryLevelReduced; } TBool CHuiFxEngine::HasActiveEffects() const { // Don't report active effects if in SW-rendering mode - if(iLowGraphicsMemoryMode) // != Normal + if(iLowGraphicsMemoryMode < EHuiMemoryLevelReduced) { return EFalse; } return iActiveEffects.Count() > 0; } +TBool CHuiFxEngine::HasActiveFadeEffect() const + { + // Don't report active effects if in SW-rendering mode + if(iLowGraphicsMemoryMode < EHuiMemoryLevelReduced) + { + return EFalse; + } + TInt effectCount = iActiveEffects.Count(); + for (TInt count = 0; count < effectCount; count++) + { + if (iActiveEffects[count]->EffectFlags() & KHuiFadeEffectFlag) + { + return ETrue; + } + } + return EFalse; + } + void CHuiFxEngine::ClearCache() { // Release cached render targets from effects @@ -657,6 +687,9 @@ EXPORT_C void CHuiFxEngine::BeginGroupEffect(TInt aGroup) { +#ifdef HUIFX_TRACE + RDebug::Printf("CHuiFxEngine::BeginGroupEffect(TInt aGroup %d) >>", aGroup); +#endif // Multiple grouped effects at the same time are not supported. // Same visual might participate different groups, which will mess up the effect if (iActiveEffectGroups.Count()>0) @@ -717,6 +750,9 @@ // keep count of effects in this group. All must draw atleast once, before // syncronized group effect may start iActiveEffectGroups[index].iWaiting++; +#ifdef HUIFX_TRACE + RDebug::Printf("CHuiFxEngine::AddEffectToGroup - %d, waiting in group: %d", aGroup, iActiveEffectGroups[index].iWaiting); +#endif return ETrue; } return EFalse; @@ -724,6 +760,9 @@ EXPORT_C void CHuiFxEngine::StartGroupEffect(TInt aGroup) { +#ifdef HUIFX_TRACE + RDebug::Printf("CHuiFxEngine::StartGroupEffect(TInt aGroup %d) >>", aGroup); +#endif TInt index = FindEffectGroup(aGroup); if (index != KErrNotFound) { @@ -743,10 +782,17 @@ void CHuiFxEngine::NotifyEffectReady(TInt aGroupId) { +#ifdef HUIFX_TRACE + RDebug::Print(_L("CHuiFxEngine::NotifyEffectReady - %d"), aGroupId); +#endif TInt index = FindEffectGroup(aGroupId); if (index != KErrNotFound) { - if (--iActiveEffectGroups[iActiveEffectGroups.Count()-1].iWaiting == 0) + iActiveEffectGroups[index].iWaiting--; +#ifdef HUIFX_TRACE + RDebug::Print(_L("CHuiFxEngine::NotifyEffectReady - waiting %d in group %d"), iActiveEffectGroups[index].iWaiting , aGroupId); +#endif + if (iActiveEffectGroups[index].iWaiting == 0) { // set in motion all effects in this group iActiveEffectGroups.Remove(index); @@ -754,6 +800,9 @@ { CHuiFxEffect* effect = iActiveEffects[i]; TInt flags = effect->EffectFlags(); +#ifdef HUIFX_TRACE + RDebug::Print(_L("CHuiFxEngine::NotifyEffectReady - effect 0x%x, group: %d, flags 0x%x"), effect, effect->GroupId(), effect->EffectFlags()); +#endif if ((flags & KHuiFxReadyAndWaitingGroupToStartSyncronized) && (effect->GroupId() == aGroupId)) { effect->ClearEffectFlag(KHuiFxReadyAndWaitingGroupToStartSyncronized); diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/src/HuiFxFilterLayer.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxFilterLayer.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxFilterLayer.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -59,7 +59,7 @@ { // iFilter does not need these } -EXPORT_C void CHuiFxFilterLayer::SetVisual( MHuiEffectable *aVisual ) +EXPORT_C void CHuiFxFilterLayer::SetVisual( MHuiEffectable * /*aVisual*/ ) { // iFilter does not need these } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/src/HuiFxVisualLayer.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxVisualLayer.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxVisualLayer.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -25,7 +25,7 @@ #include #include "HuiCmdBufferBrush.h" -EXPORT_C CHuiFxVisualLayer* CHuiFxVisualLayer::NewL(MHuiEffectable& aVisual) +EXPORT_C CHuiFxVisualLayer* CHuiFxVisualLayer::NewL(MHuiEffectable* aVisual) { CHuiFxVisualLayer* e = new (ELeave) CHuiFxVisualLayer(); CleanupStack::PushL(e); @@ -34,14 +34,14 @@ return e; } -EXPORT_C void CHuiFxVisualLayer::ConstructL(MHuiEffectable& aVisual) +EXPORT_C void CHuiFxVisualLayer::ConstructL(MHuiEffectable* aVisual) { #ifdef HUIFX_TRACE RDebug::Print(_L("CHuiFxVisualLayer::ConstructL - 0x%x "), this); #endif CHuiFxLayer::ConstructL( ELayerTypeVisual ); iParameterManager = CHuiFxParameterManager::NewL(); - iVisual = &aVisual; + iVisual = aVisual; iSrcType = EVisualSrcVisual; iExtBitmapFile = NULL; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/src/HuiRosterImpl.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/HuiRosterImpl.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/src/HuiRosterImpl.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -106,6 +106,9 @@ void CHuiRosterImpl::ShowL(CHuiControlGroup& aGroup, TInt aWhere) { + + // The group will automatically accept input events once shown. + aGroup.SetAcceptInput(ETrue); // If the group is already shown on the display, just adjust its position // according to the parameters. if(Find(&aGroup) != KErrNotFound) @@ -142,8 +145,7 @@ InsertL(&aGroup, aWhere); } - // The group will automatically accept input events once shown. - aGroup.SetAcceptInput(ETrue); + // Show all the controls of the group. for(TInt i = 0; i < aGroup.Count(); ++i) diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/src/huicanvasgc.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/huicanvasgc.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/src/huicanvasgc.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -649,6 +649,10 @@ DisableDelayedClippingIfNeeded(); Cleanup(); + + AMT_MAP_SET_VALUE_IF( iVisual && aRects.Count() > 0, iRectMap, + AMT_MAP_CPTR_TO_KEY_CAST( iVisual ), aRects[ aRects.Count() - 1 ].Round(), + EAlfModuleTestTypeCoreToolkitDrawWindow ); } EXPORT_C void CHuiCanvasGc::DoDrawRects(RArray& aRects) @@ -682,10 +686,6 @@ { iGc->DrawRect(rect); } - - AMT_MAP_INC_VALUE_IF( iVisual, iIntMap, - AMT_MAP_CPTR_TO_KEY_CAST( iVisual ), - EAlfModuleTestTypeCoreToolkitDrawWindow ); } } } @@ -1361,8 +1361,9 @@ Cleanup(); - AMT_MAP_INC_VALUE_IF( iVisual, iIntMap, - AMT_MAP_CPTR_TO_KEY_CAST( iVisual ), + AMT_MAP_SET_VALUE_IF( iVisual, iRectMap, + AMT_MAP_CPTR_TO_KEY_CAST( iVisual ), + destinationRect.Round(), EAlfModuleTestTypeCoreToolkitDrawFromRenderBuffer ); } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/coretoolkit/src/huigifanimationtexture.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/huigifanimationtexture.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/src/huigifanimationtexture.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -56,6 +56,7 @@ { iTexture->SetTextureChanged(ETrue); } + CHuiStatic::ContinueRefresh(); } EXPORT_C void CHuiGifAnimationTexture::Stop() @@ -78,6 +79,7 @@ { iAnimationState = ClearFlag(TInt(iAnimationState), TInt(EEnabled)); } + CHuiStatic::ContinueRefresh(); } EXPORT_C TInt CHuiGifAnimationTexture::Id() @@ -139,7 +141,16 @@ } iElapsedTime = 0.0f; - } + } + // not enough time was elapsed, + // if the animation is not stopped + // request continuerefresh in order + // not to go to sleep + else + { + iTexture->SetTextureChanged(ETrue); + CHuiStatic::ContinueRefresh(); + } } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/data/goomconfig.xml --- a/uiacceltk/hitchcock/goommonitor/data/goomconfig.xml Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/data/goomconfig.xml Wed Apr 14 16:53:50 2010 +0300 @@ -18,7 +18,13 @@ actions are needed. This value is meaningful only when "check" or "estimate" sync mode is used with plugins. --> - + - + @@ -70,8 +76,8 @@ - - + + diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/inc/goomaction.h --- a/uiacceltk/hitchcock/goommonitor/inc/goomaction.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/inc/goomaction.h Wed Apr 14 16:53:50 2010 +0300 @@ -46,7 +46,7 @@ * @since S60 5.0 * @param aBytesRequested ?description */ - virtual void FreeMemory(TInt aBytesRequested) = 0; + virtual void FreeMemory(TInt aBytesRequested, TBool aUseSwRendering) = 0; /** * @since S60 5.0 diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/inc/goomactionlist.h --- a/uiacceltk/hitchcock/goommonitor/inc/goomactionlist.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/inc/goomactionlist.h Wed Apr 14 16:53:50 2010 +0300 @@ -184,6 +184,13 @@ */ void AppNotExiting(TInt aWgId); + /** + * Sets the flag to free memory using sw rendering. For Alf and other plugins that use sw rendering to reduces gpu mem usage. + * @since S60 5.0 + * @param aUseSwRendering ETrue if sw rendering to be used. + */ + void SetUseSwRendering(TBool aUseSwRendering); + // from MGOomActionObserver /** @@ -251,6 +258,7 @@ TUint iCurrentPluginRun; RArray iLowOnMemWgs; + TBool iUseSwRendering; }; #include "goomactionlist.inl" diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/inc/goomapplicationconfig.h --- a/uiacceltk/hitchcock/goommonitor/inc/goomapplicationconfig.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/inc/goomapplicationconfig.h Wed Apr 14 16:53:50 2010 +0300 @@ -73,6 +73,7 @@ TUint iLowRamThreshold; TUint iTargetFree; TUint iSkipPluginId; + TBool iUseSwRendering; private: diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/inc/goomcloseapp.h --- a/uiacceltk/hitchcock/goommonitor/inc/goomcloseapp.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/inc/goomcloseapp.h Wed Apr 14 16:53:50 2010 +0300 @@ -52,7 +52,7 @@ * Call the CGOomAction::MemoryFreed when it is done * @param aBytesRequested not used for clsoe app actions */ - virtual void FreeMemory(TInt aBytesRequested); + virtual void FreeMemory(TInt aBytesRequested, TBool aUseSwRendering); ~CGOomCloseApp(); diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/inc/goomrunplugin.h --- a/uiacceltk/hitchcock/goommonitor/inc/goomrunplugin.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/inc/goomrunplugin.h Wed Apr 14 16:53:50 2010 +0300 @@ -44,7 +44,7 @@ // Run the GOOM plugin in order to free memory // Call the CGOomAction::MemoryFreed when it is done - virtual void FreeMemory(TInt aBytesRequested); + virtual void FreeMemory(TInt aBytesRequested, TBool aUseSwRendering); // Call the memory good function on the plugin but... // only if there is an outstanding FreeMemory request @@ -76,6 +76,8 @@ CGOomPluginWaiter* iPluginWaiter; TBool iFreeMemoryCalled; // True if FreeMemory has been called since the last call to MemoryGood + + TBool iFreeMemoryWithSwRenderingCalled; }; #include "goomrunplugin.inl" diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/inc/goomrunpluginconfig.h --- a/uiacceltk/hitchcock/goommonitor/inc/goomrunpluginconfig.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/inc/goomrunpluginconfig.h Wed Apr 14 16:53:50 2010 +0300 @@ -56,6 +56,10 @@ inline TGOomPluginType PluginType(); + inline void SetSwRend(TBool aSwRend); + + inline TBool IsSwRendSupported(); + private: CGOomRunPluginConfig(TUint aPluginId, TGOomPluginType aPluginType); @@ -68,6 +72,8 @@ TInt iWaitAfterPlugin; // The period to wait after a plugin has been called TGOomPluginType iPluginType; + + TBool iSwRenderingSupported; }; #include "goomrunpluginconfig.inl" diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/inc/goomrunpluginconfig.inl --- a/uiacceltk/hitchcock/goommonitor/inc/goomrunpluginconfig.inl Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/inc/goomrunpluginconfig.inl Wed Apr 14 16:53:50 2010 +0300 @@ -60,4 +60,13 @@ return iTargetAppId; } +inline void CGOomRunPluginConfig::SetSwRend(TBool aSwRend) + { + iSwRenderingSupported = aSwRend; + } + +inline TBool CGOomRunPluginConfig::IsSwRendSupported() + { + return iSwRenderingSupported; + } #endif /*GOOMRUNPLUGINCONFIGINL_H_*/ diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/inc/traceconfiguration.hrh --- a/uiacceltk/hitchcock/goommonitor/inc/traceconfiguration.hrh Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/inc/traceconfiguration.hrh Wed Apr 14 16:53:50 2010 +0300 @@ -25,11 +25,11 @@ // // just to make it easier to enable traces on rel builds also -#ifdef _DEBUG +//#ifdef _DEBUG #define _GOOM_DEBUG #define __GOOM_INFO_TRACE__ #define __GOOM_FUNC_TRACE__ -#endif +//#endif /** * Error trace enabled diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/src/goomactionlist.cpp --- a/uiacceltk/hitchcock/goommonitor/src/goomactionlist.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/src/goomactionlist.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -380,7 +380,7 @@ iFreeingMemory = ETrue; TRACES2("CGOomActionList::FreeMemory: Running action %d which has priority %d", iCurrentActionIndex,ref.Priority()); - action->FreeMemory(iCurrentTarget - memoryEstimate); + action->FreeMemory(iCurrentTarget - memoryEstimate, iUseSwRendering); iCurrentPluginRun = 0; memoryFreeingActionRun = ETrue; @@ -748,3 +748,8 @@ { return iRunningKillAppActions; } + +void CGOomActionList::SetUseSwRendering(TBool aUseSwRendering) + { + iUseSwRendering = aUseSwRendering; + } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/src/goomcloseapp.cpp --- a/uiacceltk/hitchcock/goommonitor/src/goomcloseapp.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/src/goomcloseapp.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -38,7 +38,7 @@ // Close the application in order to free memory // Call the CGOomAction::MemoryFreed when it is done -void CGOomCloseApp::FreeMemory(TInt) +void CGOomCloseApp::FreeMemory(TInt, TBool) { FUNC_LOG; 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); diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp --- a/uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -277,13 +277,13 @@ if (freeMemoryAboveCurrentTarget) { - ResetTargets(); /*if(freeMemory >= iGoodThreshold && !NeedToPostponeMemGood()) { iGOomActionList->MemoryGood(); } */ iServer->CloseAppsFinished(freeMemory, ETrue); + WaitAndSynchroniseMemoryState(); return; } @@ -386,6 +386,7 @@ TRACES2("CMemoryMonitor::RefreshThresholds: Global Good Threshold = %d, Global Low Threshold = %d", iGoodThreshold, iLowThreshold); + TBool useSwRendering = EFalse; // The global value can be overridden by an app specific value // Find the application config entry for the foreground application if (aForegroundAppUid == KErrNotFound) @@ -414,7 +415,15 @@ TRACES2("CMemoryMonitor::RefreshThresholds: For foreground app %x, Target Free on Startup = %d", aForegroundAppUid, iCurrentTarget); } + + if (iConfig->GetApplicationConfig(aForegroundAppUid).iUseSwRendering != KGOomThresholdUnset) + { + useSwRendering = iConfig->GetApplicationConfig(aForegroundAppUid).iUseSwRendering; + TRACES2("CMemoryMonitor::RefreshThresholds: For foreground app %x, UseSwRendering = %d", aForegroundAppUid, useSwRendering); + } + iGOomActionList->SetCurrentTarget(iCurrentTarget); + iGOomActionList->SetUseSwRendering(useSwRendering); #ifdef USE_ASYNCYH_NOTIFICATIONS @@ -594,7 +603,17 @@ break; } case EGL_PROF_PROCESS_USED_PRIVATE_MEMORY_NOK: + { + TUint mem = prof_data[i]; + TRACES1("Private memory Usage by app is %d", mem); + break; + } case EGL_PROF_PROCESS_USED_SHARED_MEMORY_NOK: + { + TUint mem = prof_data[i]; + TRACES1("Shared memory Usage by app is %d", mem); + break; + } default: { i++; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/src/goommonitorplugin.cpp --- a/uiacceltk/hitchcock/goommonitor/src/goommonitorplugin.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/src/goommonitorplugin.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -101,12 +101,12 @@ { } -void CAppGOomMonitorPlugin::FreeRam(TInt) +void CAppGOomMonitorPlugin::FreeRam(TInt, TBool) { SendMessageToApp(KAppGOomMonitor_FreeRam); } -void CAppGOomMonitorPlugin::MemoryGood() +void CAppGOomMonitorPlugin::MemoryGood(TBool) { SendMessageToApp(KAppGOomMonitor_MemoryGood); } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/src/goomrunplugin.cpp --- 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; } } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/goommonitor/src/goomwindowgrouplist.cpp --- a/uiacceltk/hitchcock/goommonitor/src/goomwindowgrouplist.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/goommonitor/src/goomwindowgrouplist.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -73,10 +73,14 @@ User::LeaveIfError(iAlfClient.Connect()); } iLowOnMemWgs.Reset(); - User::LeaveIfError(iAlfClient.GetListOfInactiveWindowGroupsWSurfaces(&iLowOnMemWgs)); + RArray inactiveSurfaces; - RArray& inactiveSurfaces = iLowOnMemWgs; + User::LeaveIfError(iAlfClient.GetListOfInactiveWindowGroupsWSurfaces(&inactiveSurfaces)); + User::LeaveIfError(iAlfClient.GetListOfWindowGroupsWSurfaces(&iLowOnMemWgs)); + TRACES1("Inactive surfaces count %d", inactiveSurfaces.Count()); + TRACES1("Windowgroups w/ surfaces count %d", iLowOnMemWgs.Count()); + RArray processIds; RArray privMemUsed; RArray sparedProcessIds; @@ -213,9 +217,9 @@ TWsEvent event; event.SetType(KGoomMemoryLowEvent); // naive - for (TInt i = inactiveSurfaces.Count()-1; i>=0; i--) + for (TInt i = iLowOnMemWgs.Count()-1; i>=0; i--) { - iWs.SendEventToWindowGroup(inactiveSurfaces[i], event); + iWs.SendEventToWindowGroup(iLowOnMemWgs[i], event); } #endif diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/group/core_exports.inc --- a/uiacceltk/hitchcock/group/core_exports.inc Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/group/core_exports.inc Wed Apr 14 16:53:50 2010 +0300 @@ -3,7 +3,7 @@ * Name : core_exports.inc * Part of : Alfred UI Toolkit * Description : Exported header files. -* Version : %version: tr1sido#8.1.34 % +* Version : %version: tr1sido#8.1.36 % * * Copyright © 2006-2007 Nokia. All rights reserved. * This material, including documentation and any related computer @@ -38,14 +38,18 @@ ../coretoolkit/data/activeidle_viewswitch_close_editmode.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_close_editmode.fxml ../coretoolkit/data/activeidle_viewswitch_close_widgetmanager.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_close_widgetmanager.fxml ../coretoolkit/data/activeidle_viewswitch_left.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_left.fxml -../coretoolkit/data/activeidle_viewswitch_left_appear.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_left_appear.fxml -../coretoolkit/data/activeidle_viewswitch_left_disappear.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_left_disappear.fxml +../coretoolkit/data/activeidle_viewswitch_left_appear_lsc.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_left_appear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_left_appear_prt.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_left_appear_prt.fxml +../coretoolkit/data/activeidle_viewswitch_left_disappear_lsc.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_left_disappear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_left_disappear_prt.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_left_disappear_prt.fxml ../coretoolkit/data/activeidle_viewswitch_open_editmode.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_open_editmode.fxml ../coretoolkit/data/activeidle_viewswitch_open_widgetmanager.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_open_widgetmanager.fxml ../coretoolkit/data/activeidle_viewswitch_remove_page.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_remove_page.fxml ../coretoolkit/data/activeidle_viewswitch_right.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_right.fxml -../coretoolkit/data/activeidle_viewswitch_right_appear.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_right_appear.fxml -../coretoolkit/data/activeidle_viewswitch_right_disappear.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_right_disappear.fxml +../coretoolkit/data/activeidle_viewswitch_right_appear_lsc.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_right_appear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_right_appear_prt.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_right_appear_prt.fxml +../coretoolkit/data/activeidle_viewswitch_right_disappear_lsc.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_right_disappear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_right_disappear_prt.fxml /epoc32/release/winscw/urel/z/resource/effects/activeidle_viewswitch_right_disappear_prt.fxml ../coretoolkit/data/app_activate.fxml /epoc32/release/winscw/urel/z/resource/effects/app_activate.fxml ../coretoolkit/data/app_exit.fxml /epoc32/release/winscw/urel/z/resource/effects/app_exit.fxml ../coretoolkit/data/app_start.fxml /epoc32/release/winscw/urel/z/resource/effects/app_start.fxml @@ -88,8 +92,8 @@ ../coretoolkit/data/optionsmenu_disappear.fxml /epoc32/release/winscw/urel/z/resource/effects/optionsmenu_disappear.fxml ../coretoolkit/data/photos_fullscreen_close.fxml /epoc32/release/winscw/urel/z/resource/effects/photos_fullscreen_close.fxml ../coretoolkit/data/photos_fullscreen_open.fxml /epoc32/release/winscw/urel/z/resource/effects/photos_fullscreen_open.fxml +../coretoolkit/data/photos_gridview_appear.fxml /epoc32/release/winscw/urel/z/resource/effects/photos_gridview_appear.fxml ../coretoolkit/data/photos_gridview_disappear.fxml /epoc32/release/winscw/urel/z/resource/effects/photos_gridview_disappear.fxml -../coretoolkit/data/photos_gridview_appear.fxml /epoc32/release/winscw/urel/z/resource/effects/photos_gridview_appear.fxml ../coretoolkit/data/popup_appear.fxml /epoc32/release/winscw/urel/z/resource/effects/popup_appear.fxml ../coretoolkit/data/popup_disappear.fxml /epoc32/release/winscw/urel/z/resource/effects/popup_disappear.fxml ../coretoolkit/data/popup_disappear_screenshot.fxml /epoc32/release/winscw/urel/z/resource/effects/popup_disappear_screenshot.fxml @@ -101,7 +105,6 @@ ../coretoolkit/data/systemnotify_appear.fxml /epoc32/release/winscw/urel/z/resource/effects/systemnotify_appear.fxml ../coretoolkit/data/systemnotify_disappear.fxml /epoc32/release/winscw/urel/z/resource/effects/systemnotify_disappear.fxml ../coretoolkit/data/tab_effect.fxml /epoc32/release/winscw/urel/z/resource/effects/tab_effect.fxml -../coretoolkit/data/taskswapper_app_start_disappear.fxml /epoc32/release/winscw/urel/z/resource/effects/taskswapper_app_start_disappear.fxml ../coretoolkit/data/taskswapper_app_start_rect.fxml /epoc32/release/winscw/urel/z/resource/effects/taskswapper_app_start_rect.fxml ../coretoolkit/data/taskswapper_appear.fxml /epoc32/release/winscw/urel/z/resource/effects/taskswapper_appear.fxml ../coretoolkit/data/taskswapper_disappear.fxml /epoc32/release/winscw/urel/z/resource/effects/taskswapper_disappear.fxml @@ -127,14 +130,18 @@ ../coretoolkit/data/activeidle_viewswitch_close_editmode.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_close_editmode.fxml ../coretoolkit/data/activeidle_viewswitch_close_widgetmanager.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_close_widgetmanager.fxml ../coretoolkit/data/activeidle_viewswitch_left.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_left.fxml -../coretoolkit/data/activeidle_viewswitch_left_appear.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_left_appear.fxml -../coretoolkit/data/activeidle_viewswitch_left_disappear.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_left_disappear.fxml +../coretoolkit/data/activeidle_viewswitch_left_appear_lsc.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_left_appear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_left_appear_prt.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_left_appear_prt.fxml +../coretoolkit/data/activeidle_viewswitch_left_disappear_lsc.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_left_disappear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_left_disappear_prt.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_left_disappear_prt.fxml ../coretoolkit/data/activeidle_viewswitch_open_editmode.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_open_editmode.fxml ../coretoolkit/data/activeidle_viewswitch_open_widgetmanager.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_open_widgetmanager.fxml ../coretoolkit/data/activeidle_viewswitch_remove_page.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_remove_page.fxml ../coretoolkit/data/activeidle_viewswitch_right.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_right.fxml -../coretoolkit/data/activeidle_viewswitch_right_appear.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_right_appear.fxml -../coretoolkit/data/activeidle_viewswitch_right_disappear.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_right_disappear.fxml +../coretoolkit/data/activeidle_viewswitch_right_appear_lsc.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_right_appear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_right_appear_prt.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_right_appear_prt.fxml +../coretoolkit/data/activeidle_viewswitch_right_disappear_lsc.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_right_disappear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_right_disappear_prt.fxml /epoc32/release/winscw/udeb/z/resource/effects/activeidle_viewswitch_right_disappear_prt.fxml ../coretoolkit/data/app_activate.fxml /epoc32/release/winscw/udeb/z/resource/effects/app_activate.fxml ../coretoolkit/data/app_exit.fxml /epoc32/release/winscw/udeb/z/resource/effects/app_exit.fxml ../coretoolkit/data/app_start.fxml /epoc32/release/winscw/udeb/z/resource/effects/app_start.fxml @@ -175,10 +182,10 @@ ../coretoolkit/data/optionsmenu_cascade_appear.fxml /epoc32/release/winscw/udeb/z/resource/effects/optionsmenu_cascade_appear.fxml ../coretoolkit/data/optionsmenu_cascade_disappear.fxml /epoc32/release/winscw/udeb/z/resource/effects/optionsmenu_cascade_disappear.fxml ../coretoolkit/data/optionsmenu_disappear.fxml /epoc32/release/winscw/udeb/z/resource/effects/optionsmenu_disappear.fxml +../coretoolkit/data/photos_fullscreen_close.fxml /epoc32/release/winscw/udeb/z/resource/effects/photos_fullscreen_close.fxml +../coretoolkit/data/photos_fullscreen_open.fxml /epoc32/release/winscw/udeb/z/resource/effects/photos_fullscreen_open.fxml ../coretoolkit/data/photos_gridview_appear.fxml /epoc32/release/winscw/udeb/z/resource/effects/photos_gridview_appear.fxml ../coretoolkit/data/photos_gridview_disappear.fxml /epoc32/release/winscw/udeb/z/resource/effects/photos_gridview_disappear.fxml -../coretoolkit/data/photos_fullscreen_close.fxml /epoc32/release/winscw/udeb/z/resource/effects/photos_fullscreen_close.fxml -../coretoolkit/data/photos_fullscreen_open.fxml /epoc32/release/winscw/udeb/z/resource/effects/photos_fullscreen_open.fxml ../coretoolkit/data/popup_appear.fxml /epoc32/release/winscw/udeb/z/resource/effects/popup_appear.fxml ../coretoolkit/data/popup_disappear.fxml /epoc32/release/winscw/udeb/z/resource/effects/popup_disappear.fxml ../coretoolkit/data/popup_disappear_screenshot.fxml /epoc32/release/winscw/udeb/z/resource/effects/popup_disappear_screenshot.fxml @@ -190,7 +197,6 @@ ../coretoolkit/data/systemnotify_appear.fxml /epoc32/release/winscw/udeb/z/resource/effects/systemnotify_appear.fxml ../coretoolkit/data/systemnotify_disappear.fxml /epoc32/release/winscw/udeb/z/resource/effects/systemnotify_disappear.fxml ../coretoolkit/data/tab_effect.fxml /epoc32/release/winscw/udeb/z/resource/effects/tab_effect.fxml -../coretoolkit/data/taskswapper_app_start_disappear.fxml /epoc32/release/winscw/udeb/z/resource/effects/taskswapper_app_start_disappear.fxml ../coretoolkit/data/taskswapper_app_start_rect.fxml /epoc32/release/winscw/udeb/z/resource/effects/taskswapper_app_start_rect.fxml ../coretoolkit/data/taskswapper_appear.fxml /epoc32/release/winscw/udeb/z/resource/effects/taskswapper_appear.fxml ../coretoolkit/data/taskswapper_disappear.fxml /epoc32/release/winscw/udeb/z/resource/effects/taskswapper_disappear.fxml @@ -216,14 +222,18 @@ ../coretoolkit/data/activeidle_viewswitch_close_editmode.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_close_editmode.fxml ../coretoolkit/data/activeidle_viewswitch_close_widgetmanager.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_close_widgetmanager.fxml ../coretoolkit/data/activeidle_viewswitch_left.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_left.fxml -../coretoolkit/data/activeidle_viewswitch_left_appear.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_left_appear.fxml -../coretoolkit/data/activeidle_viewswitch_left_disappear.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_left_disappear.fxml +../coretoolkit/data/activeidle_viewswitch_left_appear_lsc.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_left_appear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_left_appear_prt.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_left_appear_prt.fxml +../coretoolkit/data/activeidle_viewswitch_left_disappear_lsc.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_left_disappear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_left_disappear_prt.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_left_disappear_prt.fxml ../coretoolkit/data/activeidle_viewswitch_open_editmode.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_open_editmode.fxml ../coretoolkit/data/activeidle_viewswitch_open_widgetmanager.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_open_widgetmanager.fxml ../coretoolkit/data/activeidle_viewswitch_remove_page.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_remove_page.fxml ../coretoolkit/data/activeidle_viewswitch_right.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_right.fxml -../coretoolkit/data/activeidle_viewswitch_right_appear.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_right_appear.fxml -../coretoolkit/data/activeidle_viewswitch_right_disappear.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_right_disappear.fxml +../coretoolkit/data/activeidle_viewswitch_right_appear_lsc.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_right_appear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_right_appear_prt.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_right_appear_prt.fxml +../coretoolkit/data/activeidle_viewswitch_right_disappear_lsc.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_right_disappear_lsc.fxml +../coretoolkit/data/activeidle_viewswitch_right_disappear_prt.fxml /epoc32/data/z/resource/effects/activeidle_viewswitch_right_disappear_prt.fxml ../coretoolkit/data/app_activate.fxml /epoc32/data/z/resource/effects/app_activate.fxml ../coretoolkit/data/app_exit.fxml /epoc32/data/z/resource/effects/app_exit.fxml ../coretoolkit/data/app_start.fxml /epoc32/data/z/resource/effects/app_start.fxml @@ -264,10 +274,10 @@ ../coretoolkit/data/optionsmenu_cascade_appear.fxml /epoc32/data/z/resource/effects/optionsmenu_cascade_appear.fxml ../coretoolkit/data/optionsmenu_cascade_disappear.fxml /epoc32/data/z/resource/effects/optionsmenu_cascade_disappear.fxml ../coretoolkit/data/optionsmenu_disappear.fxml /epoc32/data/z/resource/effects/optionsmenu_disappear.fxml +../coretoolkit/data/photos_fullscreen_close.fxml /epoc32/data/z/resource/effects/photos_fullscreen_close.fxml +../coretoolkit/data/photos_fullscreen_open.fxml /epoc32/data/z/resource/effects/photos_fullscreen_open.fxml ../coretoolkit/data/photos_gridview_appear.fxml /epoc32/data/z/resource/effects/photos_gridview_appear.fxml ../coretoolkit/data/photos_gridview_disappear.fxml /epoc32/data/z/resource/effects/photos_gridview_disappear.fxml -../coretoolkit/data/photos_fullscreen_close.fxml /epoc32/data/z/resource/effects/photos_fullscreen_close.fxml -../coretoolkit/data/photos_fullscreen_open.fxml /epoc32/data/z/resource/effects/photos_fullscreen_open.fxml ../coretoolkit/data/popup_appear.fxml /epoc32/data/z/resource/effects/popup_appear.fxml ../coretoolkit/data/popup_disappear.fxml /epoc32/data/z/resource/effects/popup_disappear.fxml ../coretoolkit/data/popup_disappear_screenshot.fxml /epoc32/data/z/resource/effects/popup_disappear_screenshot.fxml @@ -279,7 +289,6 @@ ../coretoolkit/data/systemnotify_appear.fxml /epoc32/data/z/resource/effects/systemnotify_appear.fxml ../coretoolkit/data/systemnotify_disappear.fxml /epoc32/data/z/resource/effects/systemnotify_disappear.fxml ../coretoolkit/data/tab_effect.fxml /epoc32/data/z/resource/effects/tab_effect.fxml -../coretoolkit/data/taskswapper_app_start_disappear.fxml /epoc32/data/z/resource/effects/taskswapper_app_start_disappear.fxml ../coretoolkit/data/taskswapper_app_start_rect.fxml /epoc32/data/z/resource/effects/taskswapper_app_start_rect.fxml ../coretoolkit/data/taskswapper_appear.fxml /epoc32/data/z/resource/effects/taskswapper_appear.fxml ../coretoolkit/data/taskswapper_disappear.fxml /epoc32/data/z/resource/effects/taskswapper_disappear.fxml diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/plugins/alfoogmplugin/src/alfoogmplugin.cpp --- a/uiacceltk/hitchcock/plugins/alfoogmplugin/src/alfoogmplugin.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/plugins/alfoogmplugin/src/alfoogmplugin.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -30,8 +30,8 @@ void ConstructL(); public: - void FreeRam(TInt aBytesToFree); - void MemoryGood(); + void FreeRam(TInt aBytesToFree, TInt aFlags); + void MemoryGood(TInt aFlags); private: RAlfDirectClient iAlfDirectClient; @@ -68,18 +68,20 @@ // Tries to free RAM. // ----------------------------------------------------------------------------- // -void CAlfOogmMonitorPlugin::FreeRam(TInt aBytesToFree) +void CAlfOogmMonitorPlugin::FreeRam(TInt aBytesToFree, TInt aFlags) { - iAlfDirectClient.EnableLowMemoryState(aBytesToFree); + TBool useSwRend = aFlags & KGOomUseSwRendering; + iAlfDirectClient.EnableLowMemoryState(aBytesToFree, useSwRend); } // ----------------------------------------------------------------------------- // CAlfOogmMonitorPlugin::MemoryGood // ----------------------------------------------------------------------------- // -void CAlfOogmMonitorPlugin::MemoryGood() +void CAlfOogmMonitorPlugin::MemoryGood(TInt aFlags) { - iAlfDirectClient.EnableLowMemoryState(EFalse); + TBool useSwRend = aFlags & KGOomUseSwRendering; + iAlfDirectClient.EnableLowMemoryState(EFalse, useSwRend); } // ----------------------------------------------------------------------------- diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/plugins/alftranseffect/alfgfxtransadapter/src/gfxtransenginetfx.cpp --- a/uiacceltk/hitchcock/plugins/alftranseffect/alfgfxtransadapter/src/gfxtransenginetfx.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/plugins/alftranseffect/alfgfxtransadapter/src/gfxtransenginetfx.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -145,6 +145,17 @@ void IssueReq(); inline TType Type(); + TPtr8** InBuf() { return &iInPtr; } + TPtr8** OutBuf() { return &iOutPtr; } + + void ResetBufs() + { + delete iInPtr; + iInPtr = 0; + delete iOutPtr; + iOutPtr = 0; + } + private: void RunL(); void DoCancel(); @@ -153,7 +164,8 @@ MTfxServerObserver* iOwner; CGfxTransAdapterTfx* iParent; TType iType; - + TPtr8* iInPtr; + TPtr8* iOutPtr; }; // --------------------------------------------------------------------------- @@ -175,6 +187,7 @@ { __ALFFXLOGSTRING("CAlfTransitionRequest - cancelling and deleting policy request" ); Cancel(); + ResetBufs(); } // --------------------------------------------------------------------------- @@ -182,6 +195,8 @@ // void CAlfTransitionRequest::RunL() { + ResetBufs(); + if ( iStatus.Int() == KErrCancel ) { // If the request was cancelled, we are done @@ -876,6 +891,7 @@ if ( iCachedUidMapping.iWindowGroupId > 0 ) { result = iCachedUidMapping.iWindowGroupId; + iCachedUidMapping.iSecureId = 0; found = true; } } @@ -1371,10 +1387,15 @@ // send a request to plugin to start sending us policy updates // This is an asynchronous request + iPolicyReq->ResetBufs(); - TPtr8 inPtr = iAsyncTransferBuffer->Des(); + *(iPolicyReq->InBuf())= new (ELeave) TPtr8(iAsyncTransferBuffer->Des()); + TPtr8& inPtr = **iPolicyReq->InBuf(); inPtr.Zero(); - TPtr8 outPtr = iAsyncReturnBuffer->Des(); + + *(iPolicyReq->OutBuf())= new (ELeave) TPtr8(iAsyncReturnBuffer->Des()); + TPtr8& outPtr = **iPolicyReq->OutBuf(); + outPtr.Zero(); RDesWriteStream inBuf( inPtr ); TInt op = MAlfGfxEffectPlugin::ETfxServerOpControlPolicyRequest; @@ -1391,9 +1412,6 @@ __ALFFXLOGSTRING( "CGfxTransAdapterTfx::RequestPolicyUpdates" ); iTfxServer.SendAsynchronousData( iPluginImplementation, inPtr, outPtr, iPolicyReq->iStatus ); iPolicyReq->IssueReq(); - // clear out used data - inPtr.Zero(); - outPtr.Zero(); __ALFFXLOGSTRING("CGfxTransAdapterTfx::RequestPolicyUpdates <<"); return KErrNone; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/plugins/alftranseffect/alftranseffectplugin/inc/alfserverdrawer.h --- a/uiacceltk/hitchcock/plugins/alftranseffect/alftranseffectplugin/inc/alfserverdrawer.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/plugins/alftranseffect/alftranseffectplugin/inc/alfserverdrawer.h Wed Apr 14 16:53:50 2010 +0300 @@ -110,6 +110,7 @@ void DoSendBeginFullscreenL(); TInt SendBeginControlTransition(); TInt SendFinishControlTransition(); + TInt DoSendFinishControlTransition(TInt aHandle); TBool EffectFinishedFullScreen() const; @@ -203,6 +204,8 @@ RFs iFs; TBool iFullScreenFxSent; TBool iFullScreenEndSent; + + RArray iActiveControlFx; }; diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/plugins/alftranseffect/alftranseffectplugin/src/alfserverdrawer.cpp --- a/uiacceltk/hitchcock/plugins/alftranseffect/alftranseffectplugin/src/alfserverdrawer.cpp Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/plugins/alftranseffect/alftranseffectplugin/src/alfserverdrawer.cpp Wed Apr 14 16:53:50 2010 +0300 @@ -41,6 +41,7 @@ // this will stop the effect. const TInt KAlfShortEffectTimeout = 4000000; const TInt KAlfLongEffectTimeout = 5000000; +const TInt KAlfActiveControlFxGranularity = 4; //const TInt KAlfLongEffectTimeout = 500000; // Timer to send finish full screen effect @@ -237,7 +238,6 @@ iProperty.Attach( KPSAlfDomain, KAlfTransitionStatus ); iProperty.Set( KPSAlfDomain, KAlfTransitionStatus, 0 ); iFs.Connect(); - } // --------------------------------------------------------------------------- @@ -246,7 +246,8 @@ CAlfServerDrawer::CAlfServerDrawer( CAlfWindowManager* aWindowManager, CPolicyHandler& aPolicyHandler ): iWindowManager( aWindowManager ), - iPolicyHandler( aPolicyHandler ) + iPolicyHandler( aPolicyHandler ), + iActiveControlFx( KAlfActiveControlFxGranularity ) { iScrModeChangedState = EScreenModeChangedIdle; } @@ -264,7 +265,7 @@ delete iFullScreenController; delete iFinishFullScreen; delete iFullScreenTimeout; - + iActiveControlFx.Close(); } // --------------------------------------------------------------------------- @@ -663,7 +664,7 @@ RMemWriteStream stream( bridgeBuffer, bufferSize ); // The writes should not leave if we have calculated our buffer length correctly. stream.WriteInt32L( MAlfGfxEffectPlugin::EBeginFullscreen ); - stream.WriteInt32L( iCurrentFullScreenHandle ); + stream.WriteInt32L( iToSid.iId ); //iCurrentFullScreenHandle ); stream.WriteInt32L( iType ); if ( iType == AknTransEffect::EParameterType && isExit ) { @@ -1053,7 +1054,7 @@ TRAP_IGNORE( { stream.WriteInt32L( MAlfGfxEffectPlugin::EBeginComponentTransition ); - stream.WriteInt32L( iCurrentControlHandle ); + stream.WriteInt32L( iControlHandle ); //iCurrentControlHandle ); stream.WriteInt32L( iControlHandle ); // window handle stream.WriteInt32L( iControlWindowGroup ); // window group id stream.WriteInt32L( 0 ); // "screen number"; not used; save place for future @@ -1065,10 +1066,15 @@ stream.CommitL(); }); bridgerData.Set( EAlfControlEffectFx, iControlAction, bufferSize, (TAny*) index ); - __ALFFXLOGSTRING1("CAlfServerDrawer::SendBeginControlTransition - sending bridgedata, Current handle: %d", iCurrentControlHandle); + __ALFFXLOGSTRING1("CAlfServerDrawer::SendBeginControlTransition - sending bridgedata, Current handle: %d", iControlHandle) iWindowManager->PostIt( bridgerData ); stream.Close(); - iControlTransitionEndObserver->StartObserving( TCallBack( ControlTransitionFinished, this ), iCurrentControlHandle ); + iControlTransitionEndObserver->StartObserving( TCallBack( ControlTransitionFinished, this ), iControlHandle ); + + if ( iActiveControlFx.Find( iControlHandle ) == KErrNotFound ) + { + iActiveControlFx.Append( iControlHandle ); + } } iFullScreenFinished = EFalse; @@ -1086,7 +1092,24 @@ // We should now delete the effects from any controls that remain active. __ALFFXLOGSTRING("CAlfServerDrawer::SendFinishControlTransition >>"); iControlTransitionEndObserver->Cancel(); - + + while ( iActiveControlFx.Count() ) + { + TInt handle = iActiveControlFx[ iActiveControlFx.Count() - 1 ]; + iActiveControlFx.Remove( iActiveControlFx.Count() - 1 ); + DoSendFinishControlTransition( handle ); + } + + return KErrNone; + } + +// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- +// +TInt CAlfServerDrawer::DoSendFinishControlTransition(TInt aHandle) + { + __ALFFXLOGSTRING1("CAlfServerDrawer::DoSendFinishControlTransition %d >>", aHandle) + // Send the data to CAlfAppUI via bridge TAlfBridgerData bridgerData; @@ -1106,7 +1129,7 @@ TRAP_IGNORE( { stream.WriteInt32L( MAlfGfxEffectPlugin::EAbortComponentTransition ); - stream.WriteInt32L( iCurrentControlHandle ); + stream.WriteInt32L( aHandle ); stream.WriteInt32L( 0 ); stream.WriteInt32L( 0 ); stream.WriteInt32L( 0 ); @@ -1114,12 +1137,12 @@ stream.CommitL(); }); // TODO, check, if iCurrentHandle is approriate - bridgerData.Set( EAlfStopControlEffectFx, iCurrentControlHandle, bufferSize, (TAny*) index ); - __ALFFXLOGSTRING1("CAlfServerDrawer::sending bridgedata, Stop control handle: %d", iCurrentControlHandle); + bridgerData.Set( EAlfStopControlEffectFx, aHandle, bufferSize, (TAny*) index ); + __ALFFXLOGSTRING1("CAlfServerDrawer::sending bridgedata, Stop control handle: %d", aHandle); iWindowManager->PostIt( bridgerData ); stream.Close(); } - __ALFFXLOGSTRING("CAlfServerDrawer::SendFinishControlTransition <<"); + __ALFFXLOGSTRING("CAlfServerDrawer::DoSendFinishControlTransition <<") return KErrNone; } diff -r 88b23e2e82e1 -r 46927d61fef3 uiacceltk/hitchcock/plugins/openwfcrs/inc/screencaptureutil.h --- a/uiacceltk/hitchcock/plugins/openwfcrs/inc/screencaptureutil.h Wed Mar 31 23:03:58 2010 +0300 +++ b/uiacceltk/hitchcock/plugins/openwfcrs/inc/screencaptureutil.h Wed Apr 14 16:53:50 2010 +0300 @@ -17,8 +17,6 @@ #define __SCREENCAPTURERENDERSTAGE_H__ #include -#include -#include #include #include #include