--- a/uiacceltk/hitchcock/ServerCore/Inc/alfbridge.h Mon Feb 22 17:57:49 2010 +0200
+++ b/uiacceltk/hitchcock/ServerCore/Inc/alfbridge.h Fri Mar 12 15:47:04 2010 +0200
@@ -22,7 +22,7 @@
#include <e32hashtab.h>
-#define AMT_CONTROL() static_cast<CAlfModuleTestDataControl*>(Dll::Tls())
+#define AMT_CONTROL() static_cast<CAlfModuleTestDataControl*>(Dll::Tls())
#include "alfmoduletest.h"
#include "alfscreen.h"
@@ -40,7 +40,10 @@
class CAlfCommandDebug;
class CAlfLayoutSwitchEffectCoordinator;
class RMemReadStream;
-
+class CHuiCanvasVisual;
+class CFullScreenEffectState;
+class CControlEffectState;
+
const TInt KAlfBridgeRegionGranularity = 10;
NONSHARABLE_CLASS(CAlfBridge):
@@ -49,7 +52,6 @@
public MHuiDisplayRefreshObserver,
public MHuiBitmapProvider,
public MAlfGfxEffectObserver,
- public MHuiRosterObserver,
public MHuiSynchronizationObserver
{
// Helper class for keeping ongoing effects in order. Kept in iEffectCleanupStack
@@ -192,7 +194,6 @@
void HandleGfxStopEvent( TBool aClientRequest );
void EnableSwRenderingL(TBool aEnable = ETrue);
- void UploadSwRenderingTargetL( CAlfScreen* aScreen );
TBool PrepareSwRenderingTarget( CAlfScreen* aScreen );
/**
@@ -224,19 +225,29 @@
* Cancels all effects due to low memory.
*/
void LowMemoryCancelAllEffects();
-
- // From MHuiRosterObserver
- void NotifyRosterDrawStart(CHuiDisplay& aDisplay);
- void NotifyRosterDrawEnd(CHuiDisplay& aDisplay);
+
+ /**
+ * Sets HuiControlGroup as Alf application window group
+ */
+ void SetWindowGroupAsAlfApp(TInt aId);
// From MHuiSynchronizationObserver
void Synchronized(TInt aId);
+ /*
+ * HandleGfxEndFullScreenTimeout
+ *
+ * GfxTransEffect API gives EndFullScreen events too late. Thus there is a two stage process for triggering
+ * the EndFullScreen effect after BeginFullScreen event arrived.
+ *
+ * For application start effects we give N milliseconds timeout for application to finish drawing after
+ * the first drawing has arrived. If after N milliseconds application has not drawn 75% of the screen, it
+ * gets another N milliseconds. Most cases, the first N milliseconds is enough.
+ */
+ void HandleGfxEndFullScreenTimeout(CFullScreenEffectState* aFullScreenEffectData);
+
private:
- class CFullScreenEffectState;
-
- class CControlEffectState;
CAlfBridge( CAlfStreamerBridge** aHost );
@@ -289,6 +300,23 @@
*/
TBool HandleGfxEventL(CFullScreenEffectState& aEvent, CHuiLayout* aToLayout, CHuiLayout *aFromLayout);
+
+ /*
+ * ResolveAfterEffectAppearingApplicationL
+ *
+ * In case of an exit effect the appearing application is not notifed to alf
+ * by the GfxTransEffect API. In such case it is being resolved from Roster by
+ * taking the application directly under the application that is being moved
+ * to the background (when called by HandleReorderWindow) or being destroyed
+ * (called by DeleteControlGroupL).
+ *
+ * In some situation Alf may end up with wrong appearing application uid. In such
+ * case the worst that can happen, is that we must wait the frameworks
+ * EndFullScreen event to arrive.
+ */
+ void ResolveAfterEffectAppearingApplicationL(CHuiControlGroup* aGroup);
+
+
/**
* FreezeLayoutUntilEffectDestroyedL
*
@@ -663,17 +691,18 @@
TBool LoadFadeEffectsL( CHuiCanvasVisual& aVisual );
// Fading related utility methods
- static TBool CanFadeChildren( CHuiCanvasVisual& aParent );
- static TInt RecursiveChildCount( CHuiCanvasVisual& aParent, TInt aCanvasFlags );
- static TBool IsFadedByParent( CHuiCanvasVisual& aVisual );
- static TBool IsNearestParentEffectFade( CHuiCanvasVisual& aVisual );
- static TBool HasActivePaintedAreas( CHuiCanvasVisual& aVisual, TBool aIncludeChildren );
- static TBool HasActiveFadedChildren( CHuiCanvasVisual& aVisual );
+ TBool CanFadeChildren( CHuiCanvasVisual& aParent );
+ TInt RecursiveChildCount( CHuiCanvasVisual& aParent, TInt aCanvasFlags );
+ TBool IsFadedByParent( CHuiCanvasVisual& aVisual );
+ TBool IsNearestParentEffectFade( CHuiCanvasVisual& aVisual );
+ TBool HasActivePaintedAreas( CHuiCanvasVisual& aVisual, TBool aIncludeChildren );
+ TBool HasActiveFadedChildren( CHuiCanvasVisual& aVisual );
private:
RPointerArray<CAlfScreen> iAlfScreens;
void SetCursorTimerL(TUint aTime = 0, CHuiVisual* aCursor = 0);
+ TBool IsAlfOriginatedWindow(CHuiCanvasVisual& aVisual);
NONSHARABLE_CLASS ( TDeadControlGroup )
{
@@ -744,77 +773,7 @@
// See method RemoveTemporaryPresenterVisuals.
RArray<TInt> iFinishedCleanupStackEffects;
- // Effects states are used for effects request that arrive before the effected
- // window has been created. This is very common with fullscreen effects and
- // occational with control effects.
- //
- // NOTE: control effects support currently only one "delayed" effect. This is propably
- // not sufficient for all sitations.
- NONSHARABLE_CLASS(CEffectState) : public CBase
- {
- public:
-
- CEffectState();
- ~CEffectState();
-
- protected:
- /**
- * ResolveFileNameL
- *
- * Reads filename from stream and composes it to iEffectName variable.
- */
- void ResolveFileNameL(RMemReadStream& aStream);
-
- public:
-
- TInt iAction;
- TInt iHandle;
-
- HBufC* iEffectName;
- // Handle using which client should be informed of completion.
- TInt iCompletionHandle;
- // State information
- TInt iOperation;
-
- };
-
- NONSHARABLE_CLASS( CControlEffectState ) : public CEffectState
- {
- public:
-
- TUint32 iClientHandle;
- TUint32 iClientGroupHandle;
-
- void ConstructL(TInt aAction, RMemReadStream& aStream);
- };
-
- NONSHARABLE_CLASS( CFullScreenEffectState ) : public CEffectState
- {
- public:
- // CFullScreenEffectState();
- // ~CFullScreenEffectState();
-
- void ConstructL(TInt aAction, RMemReadStream& aStream);
-
- // Information from BeginFullScreen
- TInt iType;
- TInt iWg1;
- TInt iWg2;
- TInt iToAppId;
- TInt iFromAppId;
- TRect iRect;
-
- // ETrue if waiting for window group to appear
- TBool iWaitingWindowGroup;
- // ETrue if end fullscreen has been performed
- TBool iEndFullScreen;
- // ETrue if setup effect container has been done
- TBool iSetupDone;
-
- // used for resolving the iCleanupStackItem that holds the frozen app layout underneath the starting application
- TInt iAppStartScreenshotItemHandle;
- };
-
+
/**
* Full screen effect state.
* Own.
@@ -868,6 +827,7 @@
};
RHashMap<TUint32,THashVisualStruct> iWindowHashArray;
+ CHuiControl* iOrphanStorage; // owned. holds the visuals which are orphaned from their control group
class TRegisteredEffectsStruct
{
public:
@@ -923,6 +883,10 @@
TInt iTempTotalActiveVisualCount;
TInt iTempTotalPassiveVisualCount;
#endif
+ #ifdef ALF_DEBUG_PRINT_WINDOWGROUP_ORDER
+ TInt activevisualcount;
+ TInt passivevisualcount;
+ #endif
};
#endif // __ALF_BRIDGE_H__
\ No newline at end of file