uiacceltk/hitchcock/AlfDecoderServerClient/src/alfcompositionclient.cpp
changeset 14 83d2d132aa58
parent 0 15bf7259bb7c
child 19 f5bac0badc7e
equal deleted inserted replaced
13:8f67d927ea57 14:83d2d132aa58
   256         {
   256         {
   257         iController->GraphicsMemoryGood();
   257         iController->GraphicsMemoryGood();
   258         return;
   258         return;
   259         }    
   259         }    
   260     
   260     
       
   261     if (aEventType == KAlfCompositionLayoutSwitchComplete && iController)
       
   262         {
       
   263         iController->AlfBridgeCallback(KAlfCompositionLayoutSwitchComplete, NULL);
       
   264         }
       
   265     
   261     TInt* ptr = static_cast<TInt*>(aEventData);
   266     TInt* ptr = static_cast<TInt*>(aEventData);
   262     TInt target;
   267     TInt target;
   263     
   268     
   264     // find out if target is a host (is binded to some other target)
   269     // find out if target is a host (is binded to some other target)
   265     TInt bindedTarget = 0;
   270     TInt bindedTarget = 0;
   384         case KAlfCompOpSessionClosed:
   389         case KAlfCompOpSessionClosed:
   385             {
   390             {
   386             iController->DeleteTarget(target);
   391             iController->DeleteTarget(target);
   387             break;
   392             break;
   388             }
   393             }
   389             
   394         
       
   395         case KAlfCompositionTargetVisible:
       
   396             {
       
   397             iController->HideTarget(target, EFalse);
       
   398             break;
       
   399             }    
       
   400 
       
   401         case KAlfCompositionTargetHidden:
       
   402             {
       
   403             iController->HideTarget(target, ETrue);
       
   404             break;
       
   405             }    
   390         default:
   406         default:
   391             break;
   407             break;
   392         }
   408         }
   393     }    
   409     }    
   394 
   410 
   811     CSurfaceUpdateCallback* iSurfaceUpdateWaiter;
   827     CSurfaceUpdateCallback* iSurfaceUpdateWaiter;
   812     
   828     
   813     TInt iCurrentBuffer;
   829     TInt iCurrentBuffer;
   814     
   830     
   815     TRect iSurfaceRect;
   831     TRect iSurfaceRect;
       
   832     
       
   833     TInt iWaiterAoPriority;
   816     };
   834     };
   817 
   835 
   818 
   836 
   819 
   837 
   820 // ---------------------------------------------------------------------------
   838 // ---------------------------------------------------------------------------
   823 //
   841 //
   824 EXPORT_C CAlfCompositionPixelSource* CAlfCompositionPixelSource::NewL(MAlfBufferProvider& aProvider, RWindow* aWindow)
   842 EXPORT_C CAlfCompositionPixelSource* CAlfCompositionPixelSource::NewL(MAlfBufferProvider& aProvider, RWindow* aWindow)
   825     {
   843     {
   826     CAlfCompositionPixelSource* me = new (ELeave) CAlfCompositionPixelSource();
   844     CAlfCompositionPixelSource* me = new (ELeave) CAlfCompositionPixelSource();
   827     CleanupStack::PushL(me);
   845     CleanupStack::PushL(me);
   828     me->ConstructL(aProvider, aWindow);
   846     me->ConstructL(aProvider, CActive::EPriorityIdle, aWindow);
   829     CleanupStack::Pop(me);
   847     CleanupStack::Pop(me);
   830     return me;    
   848     return me;    
   831     }
   849     }
       
   850 
       
   851 // ---------------------------------------------------------------------------
       
   852 // CAlfCompositionPixelSource::NewL
       
   853 // ---------------------------------------------------------------------------
       
   854 //
       
   855 EXPORT_C CAlfCompositionPixelSource* CAlfCompositionPixelSource::NewL(MAlfBufferProvider& aProvider, TInt aPriority, RWindow* aWindow)
       
   856     {
       
   857     CAlfCompositionPixelSource* me = new (ELeave) CAlfCompositionPixelSource();
       
   858     CleanupStack::PushL(me);
       
   859     me->ConstructL(aProvider, aPriority, aWindow);
       
   860     CleanupStack::Pop(me);
       
   861     return me;    
       
   862     }
       
   863 
   832 
   864 
   833 // ---------------------------------------------------------------------------
   865 // ---------------------------------------------------------------------------
   834 // CAlfCompositionPixelSource::ActivateL
   866 // CAlfCompositionPixelSource::ActivateL
   835 // ---------------------------------------------------------------------------
   867 // ---------------------------------------------------------------------------
   836 //
   868 //
   860   
   892   
   861     if( iData->iSourceStatus != CAlfCompositionPixelSourceData::EActive )
   893     if( iData->iSourceStatus != CAlfCompositionPixelSourceData::EActive )
   862         {
   894         {
   863         if( !iData->iSurfaceUpdateWaiter )
   895         if( !iData->iSurfaceUpdateWaiter )
   864             {
   896             {
   865             iData->iSurfaceUpdateWaiter = new (ELeave) CSurfaceUpdateCallback( *this, 0, CActive::EPriorityIdle );
   897             iData->iSurfaceUpdateWaiter = new (ELeave) CSurfaceUpdateCallback( *this, 0, iData->iWaiterAoPriority );
   866             }
   898             }
   867 
   899 
   868         iData->iSurfaceUpdateWaiter->SetActive();
   900         iData->iSurfaceUpdateWaiter->SetActive();
   869         TRequestStatus* status = &iData->iSurfaceUpdateWaiter->iStatus;
   901         TRequestStatus* status = &iData->iSurfaceUpdateWaiter->iStatus;
   870         User::RequestComplete(status, KErrNone);
   902         User::RequestComplete(status, KErrNone);
   948 
   980 
   949 // ---------------------------------------------------------------------------
   981 // ---------------------------------------------------------------------------
   950 // CAlfCompositionPixelSource::ConstructL
   982 // CAlfCompositionPixelSource::ConstructL
   951 // ---------------------------------------------------------------------------
   983 // ---------------------------------------------------------------------------
   952 //
   984 //
   953 void CAlfCompositionPixelSource::ConstructL(MAlfBufferProvider& aProvider, RWindow* aWindow)
   985 void CAlfCompositionPixelSource::ConstructL(MAlfBufferProvider& aProvider, TInt aPriority, RWindow* aWindow)
   954     {
   986     {
   955     iData = CAlfCompositionPixelSourceData::NewL( aProvider );
   987     iData = CAlfCompositionPixelSourceData::NewL( aProvider );
       
   988     iData->iWaiterAoPriority = aPriority;
       
   989 
   956     TInt screenNumber = KErrNotFound;
   990     TInt screenNumber = KErrNotFound;
   957     if( aWindow )
   991     if( aWindow )
   958         {
   992         {
   959         iData->iWindow = aWindow;
   993         iData->iWindow = aWindow;
   960         screenNumber = aWindow->ScreenNumber();
   994         screenNumber = aWindow->ScreenNumber();