--- a/uiaccelerator_plat/alf_client_server_api/inc/alf/alfappserver.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_client_server_api/inc/alf/alfappserver.h Tue Apr 27 17:34:42 2010 +0300
@@ -263,6 +263,9 @@
CAlfAppSrvSessionBase* SrvSessionForControlGroup(CHuiControlGroup& aGroup);
+ TInt GetLastActiveClient();
+
+
public:
CAlfAppSrvSessionBase* iOldSession;
--- a/uiaccelerator_plat/alf_client_server_api/inc/alf/alfappui.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_client_server_api/inc/alf/alfappui.h Tue Apr 27 17:34:42 2010 +0300
@@ -203,6 +203,8 @@
CAlfAppSrvSessionBase* SrvSessionForControlGroup(CHuiControlGroup& aGroup);
void DoBlankScreen(const RMessage2& aMessage);
+
+ TInt GetLastActiveClient();
private:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/uiaccelerator_plat/alf_core_toolkit_api/tsrc/bwins/testuiaifcoretoolkitu.def Tue Apr 27 17:34:42 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/uiaccelerator_plat/alf_core_toolkit_api/tsrc/eabi/testuiaifcoretoolkitu.def Tue Apr 27 17:34:42 2010 +0300
@@ -0,0 +1,31 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI28CTestUiAifBlocksManagerChild @ 2 NONAME
+ _ZTI28CTestUiAifBlocksTextureChild @ 3 NONAME
+ _ZTI31CTestUiAifBlocksHuiControlChild @ 4 NONAME
+ _ZTI35TTestUiAifBlocksHuiTextCommandChild @ 5 NONAME
+ _ZTI36TTestUiAifBlocksHuiGroupCommandChild @ 6 NONAME
+ _ZTI36TTestUiAifBlocksHuiImageCommandChild @ 7 NONAME
+ _ZTI36TTestUiAifBlocksHuiPointCommandChild @ 8 NONAME
+ _ZTI36TTestUiAifBlocksHuiTransCommandChild @ 9 NONAME
+ _ZTI36TTestUiAifBlocksHuiValueCommandChild @ 10 NONAME
+ _ZTI37TTestUiAifBlocksHuiActionCommandChild @ 11 NONAME
+ _ZTI37TTestUiAifBlocksHuiMarkerCommandChild @ 12 NONAME
+ _ZTI37TTestUiAifBlocksHuiVisualCommandChild @ 13 NONAME
+ _ZTI38TTestUiAifBlocksHuiControlCommandChild @ 14 NONAME
+ _ZTI42TTestUiAifBlocksHuiCustomEventCommandChild @ 15 NONAME
+ _ZTV28CTestUiAifBlocksManagerChild @ 16 NONAME
+ _ZTV28CTestUiAifBlocksTextureChild @ 17 NONAME
+ _ZTV31CTestUiAifBlocksHuiControlChild @ 18 NONAME
+ _ZTV35TTestUiAifBlocksHuiTextCommandChild @ 19 NONAME
+ _ZTV36TTestUiAifBlocksHuiGroupCommandChild @ 20 NONAME
+ _ZTV36TTestUiAifBlocksHuiImageCommandChild @ 21 NONAME
+ _ZTV36TTestUiAifBlocksHuiPointCommandChild @ 22 NONAME
+ _ZTV36TTestUiAifBlocksHuiTransCommandChild @ 23 NONAME
+ _ZTV36TTestUiAifBlocksHuiValueCommandChild @ 24 NONAME
+ _ZTV37TTestUiAifBlocksHuiActionCommandChild @ 25 NONAME
+ _ZTV37TTestUiAifBlocksHuiMarkerCommandChild @ 26 NONAME
+ _ZTV37TTestUiAifBlocksHuiVisualCommandChild @ 27 NONAME
+ _ZTV38TTestUiAifBlocksHuiControlCommandChild @ 28 NONAME
+ _ZTV42TTestUiAifBlocksHuiCustomEventCommandChild @ 29 NONAME
+
--- a/uiaccelerator_plat/alf_extension_api/inc/alf/alfconstants.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_extension_api/inc/alf/alfconstants.h Tue Apr 27 17:34:42 2010 +0300
@@ -1061,6 +1061,7 @@
{
TFileName iFileName;
TInt iGroupHandle;
+ TInt iHandle;
};
/**
* Use the following functions to serialize the RArray<T> objects so
--- a/uiaccelerator_plat/alf_visual_api/inc/goommonitor/goommonitorplugin.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_visual_api/inc/goommonitor/goommonitorplugin.h Tue Apr 27 17:34:42 2010 +0300
@@ -25,6 +25,9 @@
class RFs;
class RWsSession;
+// temp support for migration
+#define __GOOM_PLUGIN_API_V2
+
enum TGOomMonitorFlags
{
KGOomNone = 0,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/uiaccelerator_plat/alf_visual_api/tsrc/bwins/testplatalfvisualu.def Tue Apr 27 17:34:42 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/uiaccelerator_plat/alf_visual_api/tsrc/eabi/testplatalfvisualu.def Tue Apr 27 17:34:42 2010 +0300
@@ -0,0 +1,21 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI15CTestCAlfLayout @ 2 NONAME
+ _ZTI16CTestCAlfControl @ 3 NONAME
+ _ZTI19CTestCAlfDeckLayout @ 4 NONAME
+ _ZTI19CTestCAlfFlowLayout @ 5 NONAME
+ _ZTI19CTestCAlfGridLayout @ 6 NONAME
+ _ZTI19CTestCAlfLineVisual @ 7 NONAME
+ _ZTI19CTestCAlfMeshVisual @ 8 NONAME
+ _ZTI20CTestCAlfImageVisual @ 9 NONAME
+ _ZTI24CTestCAlfCurvePathLayout @ 10 NONAME
+ _ZTV15CTestCAlfLayout @ 11 NONAME
+ _ZTV16CTestCAlfControl @ 12 NONAME
+ _ZTV19CTestCAlfDeckLayout @ 13 NONAME
+ _ZTV19CTestCAlfFlowLayout @ 14 NONAME
+ _ZTV19CTestCAlfGridLayout @ 15 NONAME
+ _ZTV19CTestCAlfLineVisual @ 16 NONAME
+ _ZTV19CTestCAlfMeshVisual @ 17 NONAME
+ _ZTV20CTestCAlfImageVisual @ 18 NONAME
+ _ZTV24CTestCAlfCurvePathLayout @ 19 NONAME
+
--- a/uiaccelerator_plat/alf_visual_api/tsrc/group/testplatalfvisual.pkg Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_visual_api/tsrc/group/testplatalfvisual.pkg Tue Apr 27 17:34:42 2010 +0300
@@ -73,8 +73,8 @@
"..\conf\ui_testplatalfvisualtextstyle.cfg"-"c:\Testframework\ui_testplatalfvisualtextstyle.cfg", FF ; FF stands for Normal file
"..\conf\tctestplatalfvisualtexture.cfg"-"c:\Testframework\tctestplatalfvisualtexture.cfg", FF ; FF stands for Normal file
"..\conf\ui_testplatalfvisualtexture.cfg"-"c:\Testframework\ui_testplatalfvisualtexture.cfg", FF ; FF stands for Normal file
-"..\conf\tctestplatalfvisualtextureautosizeparams.cfg"-"c:\Testframework\tctestplatalfvisualtextureautosizeparams.cfg", FF ; FF stands for Normal file
-"..\conf\ui_testplatalfvisualtextureautosizeparams.cfg"-"c:\Testframework\ui_testplatalfvisualtextureautosizeparams.cfg", FF ; FF stands for Normal file
+"..\conf\tctestplatalfvisualtextureautosize.cfg"-"c:\Testframework\tctestplatalfvisualtextureautosize.cfg", FF ; FF stands for Normal file
+"..\conf\ui_testplatalfvisualtextureautosize.cfg"-"c:\Testframework\ui_testplatalfvisualtextureautosize.cfg", FF ; FF stands for Normal file
"..\conf\tctestplatalfvisualshadowborderbrush.cfg"-"c:\Testframework\tctestplatalfvisualshadowborderbrush.cfg", FF ; FF stands for Normal file
"..\conf\ui_testplatalfvisualshadowborderbrush.cfg"-"c:\Testframework\ui_testplatalfvisualshadowborderbrush.cfg", FF ; FF stands for Normal file
"..\conf\tctestplatalfvisualpropertyowner.cfg"-"c:\Testframework\tctestplatalfvisualpropertyowner.cfg", FF ; FF stands for Normal file
@@ -89,8 +89,8 @@
"..\conf\ui_testplatalfvisualdecklayout.cfg"-"c:\Testframework\ui_testplatalfvisualdecklayout.cfg", FF ; FF stands for Normal file
"..\conf\tctestplatalfvisualdisplay.cfg"-"c:\Testframework\tctestplatalfvisualdisplay.cfg", FF ; FF stands for Normal file
"..\conf\ui_testplatalfvisualdisplay.cfg"-"c:\Testframework\ui_testplatalfvisualdisplay.cfg", FF ; FF stands for Normal file
-"..\conf\tctestplatalfvisualdisplaybackgrounditem.cfg"-"c:\Testframework\tctestplatalfvisualdisplaybackgrounditem.cfg", FF ; FF stands for Normal file
-"..\conf\ui_testplatalfvisualdisplaybackgrounditem.cfg"-"c:\Testframework\ui_testplatalfvisualdisplaybackgrounditem.cfg", FF ; FF stands for Normal file
+"..\conf\tctestplatalfvisualdisplaybgitem.cfg"-"c:\Testframework\tctestplatalfvisualdisplaybgitem.cfg", FF ; FF stands for Normal file
+"..\conf\ui_testplatalfvisualdisplaybgitem.cfg"-"c:\Testframework\ui_testplatalfvisualdisplaybgitem.cfg", FF ; FF stands for Normal file
"..\conf\tctestplatalfvisualdropsshadow.cfg"-"c:\Testframework\tctestplatalfvisualdropsshadow.cfg", FF ; FF stands for Normal file
"..\conf\ui_testplatalfvisualdropsshadow.cfg"-"c:\Testframework\ui_testplatalfvisualdropsshadow.cfg", FF ; FF stands for Normal file
"..\conf\tctestplatalfvisualdropsshadowbrush.cfg"-"c:\Testframework\tctestplatalfvisualdropsshadowbrush.cfg", FF ; FF stands for Normal file
--- a/uiaccelerator_plat/alf_visual_api/tsrc/init/testplatalfvisual.ini Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_visual_api/tsrc/init/testplatalfvisual.ini Tue Apr 27 17:34:42 2010 +0300
@@ -94,7 +94,7 @@
TestCaseFile= c:\testframework\tctestplatalfvisualtextstylemanager.cfg
TestCaseFile= c:\testframework\tctestplatalfvisualtextstyle.cfg
TestCaseFile= c:\testframework\tctestplatalfvisualtexture.cfg
-TestCaseFile= c:\testframework\tctestplatalfvisualtextureautosizeparams.cfg
+TestCaseFile= c:\testframework\tctestplatalfvisualtextureautosize.cfg
TestCaseFile= c:\testframework\tctestplatalfvisualshadowborderbrush.cfg
TestCaseFile= c:\testframework\tctestplatalfvisualpropertyowner.cfg
TestCaseFile= c:\testframework\tctestplatalfvisualroster.cfg
@@ -104,7 +104,7 @@
TestCaseFile= c:\testframework\tctestplatalfvisualcurvepathlayout.cfg
TestCaseFile= c:\testframework\tctestplatalfvisualdecklayout.cfg
TestCaseFile= c:\testframework\tctestplatalfvisualdisplay.cfg
-TestCaseFile= c:\testframework\tctestplatalfvisualdisplaybackgrounditem.cfg
+TestCaseFile= c:\testframework\tctestplatalfvisualdisplaybgitem.cfg
TestCaseFile= c:\testframework\tctestplatalfvisualdropsshadow.cfg
TestCaseFile= c:\testframework\tctestplatalfvisualdropsshadowbrush.cfg
TestCaseFile= c:\testframework\tctestplatalfvisualenv.cfg
--- a/uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksm3gmesh.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksm3gmesh.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -41,6 +41,11 @@
// Print to log file
iLog->Log( KTestAlfM3GMeshLoadSceneL );
+ // Mesh not supported at the moment
+ STIF_ASSERT_LEAVES_WITH( KErrNotSupported,
+ CAlfMeshVisual::AddNewL( *iAlfCtl ) );
+ return KErrNone;
+/* Not supported at the moment
CAlfMeshVisual* vVisual = CAlfMeshVisual::AddNewL( *iAlfCtl );
vVisual->CreateMeshL( EAlfMeshTypeM3G );
CAlfM3GMesh* vMesh = vVisual->M3GMesh();
@@ -55,7 +60,7 @@
{
return KErrNone;
}
-
+*/
}
// End of file
--- a/uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksmesh.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksmesh.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -40,6 +40,10 @@
// Print to log file
iLog->Log( KTestAlfMeshSetAndGetL );
+ // Mesh not supported at the moment
+ STIF_ASSERT_LEAVES_WITH( KErrNotSupported,
+ CAlfMeshVisual::AddNewL( *iAlfCtl ) );
+/* Not supported at the moment
CAlfMeshVisual* vVisual = CAlfMeshVisual::AddNewL( *iAlfCtl );
vVisual->CreateMeshL( EAlfMeshTypeM3G );
CAlfMesh& vMesh = vVisual->Mesh();
@@ -51,7 +55,7 @@
vMesh.StartAnimationController( iAlfCtl->Id() );
vMesh.StopAnimationController( iAlfCtl->Id() );
vMesh.Reset();
-
+*/
return KErrNone;
}
--- a/uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksmeshvisual.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksmeshvisual.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -107,9 +107,13 @@
// Print to log file
iLog->Log( KTestAlfMeshVisualAddNewL );
- CAlfMeshVisual* vVisual = CAlfMeshVisual::AddNewL( *iAlfCtl );
+ // Mesh not supported at the moment
+ STIF_ASSERT_LEAVES_WITH( KErrNotSupported,
+ CAlfMeshVisual::AddNewL( *iAlfCtl ) );
+/* Not supported at the moment
+ CAlfMeshVisual* vVisual = CAlfMeshVisual::AddNewL( *iAlfCtl );
STIF_ASSERT_NOT_NULL( vVisual );
-
+*/
return KErrNone;
}
@@ -125,6 +129,10 @@
// Print to log file
iLog->Log( KTestAlfMeshVisualSetAndGetL );
+ // Mesh not supported at the moment
+ STIF_ASSERT_LEAVES_WITH( KErrNotSupported,
+ CAlfMeshVisual::AddNewL( *iAlfCtl ) );
+/* Not supported at the moment
CAlfMeshVisual* vVisual = CAlfMeshVisual::AddNewL( *iAlfCtl );
vVisual->CreateMeshL( EAlfMeshTypeM3G );
TUid vUid = { 0x00000000 };
@@ -154,7 +162,7 @@
vVisual->PitchAngle();
vVisual->SetScale( vValue );
vVisual->Scale();
-
+*/
return KErrNone;
}
@@ -170,13 +178,17 @@
// Print to log file
iLog->Log( KTestAlfMeshVisualForVisualL );
+ // Mesh not supported at the moment
+ STIF_ASSERT_LEAVES_WITH( KErrNotSupported,
+ CAlfMeshVisual::AddNewL( *iAlfCtl ) );
+/* Not supported at the moment
CAlfMeshVisual* vVisual = CAlfMeshVisual::AddNewL( *iAlfCtl );
_LIT8( KTest, "tset" );
TBuf8<KBufSize> vBuf( KTest );
vVisual->FindTag( vBuf );
vVisual->UpdateChildrenLayout();
vVisual->RemoveAndDestroyAllD();
-
+*/
return KErrNone;
}
--- a/uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksproceduralmesh.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksproceduralmesh.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -41,6 +41,10 @@
// Print to log file
iLog->Log( KTestProMeshMakeMethodsL );
+ // Mesh not supported at the moment
+ STIF_ASSERT_LEAVES_WITH( KErrNotSupported,
+ CAlfMeshVisual::AddNewL( *iAlfCtl ) );
+/* Not supported at the moment
CAlfMeshVisual* meshVisual = CAlfMeshVisual::AddNewL( *iAlfCtl );
meshVisual->CreateMeshL( EAlfMeshTypeProcedural );
CAlfProceduralMesh* proMesh = meshVisual->ProceduralMesh();
@@ -48,7 +52,7 @@
proMesh->MakeCubeL( 1, 1, 1, 1 );
proMesh->MakeSphereL( 1, 1, 1 );
proMesh->MakeTorusL( 1, 1, 1, 1, 1 );
-
+*/
return KErrNone;
}
@@ -65,13 +69,17 @@
// Print to log file
iLog->Log( KTestProMeshMaterialMethodsL );
+ // Mesh not supported at the moment
+ STIF_ASSERT_LEAVES_WITH( KErrNotSupported,
+ CAlfMeshVisual::AddNewL( *iAlfCtl ) );
+/* Not supported at the moment
CAlfMeshVisual* meshVisual = CAlfMeshVisual::AddNewL( *iAlfCtl );
meshVisual->CreateMeshL( EAlfMeshTypeProcedural );
CAlfProceduralMesh* proMesh = meshVisual->ProceduralMesh();
STIF_ASSERT_NOT_NULL( proMesh );
TAlfMaterial material = proMesh->Material();
proMesh->SetMaterial( material );
-
+*/
return KErrNone;
}
--- a/uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblockssymbiansbdrawer.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblockssymbiansbdrawer.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -72,6 +72,14 @@
TPoint( KTestDisplayPosX, KTestDisplayPosY ),
TSize( KTestDisplayWidth, KTestDisplayHeight )
);
+ TRAPD( trapError,
+ iAlfEnv->NewDisplayL(
+ dispRect, 0, NULL,
+ CAlfDisplay::EDisplayOffScreenBuffer,
+ KTestScreenBufferUid ) );
+ // CAlfDisplay::EDisplayOffScreenBuffer is not supported for new display.
+ STIF_ASSERT_EQUALS( KErrNotSupported, trapError );
+/** Deprecated test
CAlfDisplay* alfDisp = &( iAlfEnv->NewDisplayL(
dispRect, 0, NULL,
CAlfDisplay::EDisplayOffScreenBuffer,
@@ -114,6 +122,7 @@
CleanupStack::PopAndDestroy( bitmap );
CleanupStack::PopAndDestroy( scrBuffer );
CleanupStack::PopAndDestroy( observer );
+*/
return KErrNone;
}
@@ -135,6 +144,14 @@
TPoint( KTestDisplayPosX, KTestDisplayPosY ),
TSize( KTestDisplayWidth, KTestDisplayHeight )
);
+ TRAPD( trapError,
+ iAlfEnv->NewDisplayL(
+ dispRect, 0, NULL,
+ CAlfDisplay::EDisplayOffScreenBuffer,
+ KTestScreenBufferUid ) );
+ // CAlfDisplay::EDisplayOffScreenBuffer is not supported for new display.
+ STIF_ASSERT_EQUALS( KErrNotSupported, trapError );
+/** Deprecated test
CAlfDisplay* alfDisp = &( iAlfEnv->NewDisplayL(
dispRect, 0, NULL,
CAlfDisplay::EDisplayOffScreenBuffer,
@@ -155,7 +172,7 @@
drawer->GetBufferBitmaps( bitmap, mask );
CleanupStack::PopAndDestroy( scrBuffer );
CleanupStack::PopAndDestroy( observer );
-
+*/
return KErrNone;
}
@@ -176,6 +193,14 @@
TPoint( KTestDisplayPosX, KTestDisplayPosY ),
TSize( KTestDisplayWidth, KTestDisplayHeight )
);
+ TRAPD( trapError,
+ iAlfEnv->NewDisplayL(
+ dispRect, 0, NULL,
+ CAlfDisplay::EDisplayOffScreenBuffer,
+ KTestScreenBufferUid ) );
+ // CAlfDisplay::EDisplayOffScreenBuffer is not supported for new display.
+ STIF_ASSERT_EQUALS( KErrNotSupported, trapError );
+/** Deprecated test
CAlfDisplay* alfDisp = &( iAlfEnv->NewDisplayL(
dispRect, 0, NULL,
CAlfDisplay::EDisplayOffScreenBuffer,
@@ -195,7 +220,7 @@
drawer = NULL;
CleanupStack::PopAndDestroy( scrBuffer );
CleanupStack::PopAndDestroy( observer );
-
+*/
return KErrNone;
}
--- a/uiacceltk/hitchcock/AlfDecoderServerClient/src/alfcompositionclient.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/AlfDecoderServerClient/src/alfcompositionclient.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -295,7 +295,9 @@
}
case KAlfCompOpBindSourceToToken:
{
+#ifdef _ALF_LOGGING
RDebug::Print(_L("ptr0: %d, Target %d, Flags %d, combinedtarget"), ptr[0], ptr[1], ptr[2]);
+#endif // #ifdef _ALF_LOGGING
if( ptr[1] != 0) // add binding information for new host to given target with permitted operations
{
iHostBindingsHash.Insert(*ptr, ptr[1]);
@@ -479,7 +481,9 @@
void CAlfCompositionSource::ConstructL(TInt aWsHandle, TInt aGroupHandle, TInt aScreenNumber)
{
iData = CAlfCompositionSourceData::NewL();
+#ifdef _ALF_LOGGING
RDebug::Print(_L("CAlfCompositionClientBase::ConstructL - %d"), iData );
+#endif // #ifdef _ALF_LOGGING
User::LeaveIfError( SendEvent(KAlfCompositionSourceScreenNumber, &aScreenNumber, sizeof(TInt)));
@@ -698,7 +702,9 @@
void CAlfCompositionHost::ConstructL(TInt aToken, TInt aKey)
{
iData = CAlfCompositionSourceData::NewL();
+#ifdef _ALF_LOGGING
RDebug::Print(_L("CAlfCompositionClientBase::ConstructL - %d"), iData );
+#endif // #ifdef _ALF_LOGGING
TInt array[] = { 0, aToken, aKey };
TInt result = SendEvent(KAlfCompOpBindSourceToToken, array, sizeof(array));
--- a/uiacceltk/hitchcock/AlfRenderStage/inc/alfrssendbuffer.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/AlfRenderStage/inc/alfrssendbuffer.h Tue Apr 27 17:34:42 2010 +0300
@@ -399,6 +399,11 @@
*/
void Synchronize(TInt aId);
+ void SetCompositionModified()
+ {
+ iCompositionModified = ETrue;
+ }
+
public: // From CActive
void RunL();
@@ -818,5 +823,6 @@
TBool iLayersEnabled;
#endif
TInt iOrientation;
+ TBool iCompositionModified;
};
#endif /*CALFSENDBUFFER_H_*/
--- a/uiacceltk/hitchcock/AlfRenderStage/src/alfrenderstage.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/AlfRenderStage/src/alfrenderstage.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -209,6 +209,12 @@
__ALFLOGSTRING2("CAlfRenderStage::End. iScreenNumber=%d, aFinished=%d", iScreenNumber,aFinished);
if (iAlfSendBuffer->FrameContainsDataL() )
{
+ // set up the link for composition rs
+ MAlfCompositionController* compcntrl = ( MAlfCompositionController*)ResolveObjectInterface(KAlfCompositionControllerIfUid);
+ if (compcntrl)
+ {
+ compcntrl->AlfBridgeCallback(MAlfBridge::EEndCallbackInitiated,0);
+ }
TRAP( err, iAlfSendBuffer->SendL( aFinished ));
}
else
--- a/uiacceltk/hitchcock/AlfRenderStage/src/alfrssendbuffer.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/AlfRenderStage/src/alfrssendbuffer.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -1321,13 +1321,14 @@
TInt lastWrittenOffset( iOffset );
Commit();
- TIpcArgs args( lastWrittenOffset );
- // __ALFLOGSTRING1("CAlfRsSendBuffer::SendL, offset %d ( TRequestStatus)"), lastWrittenOffset );
+ TIpcArgs args( lastWrittenOffset, iCompositionModified );
+ //RDebug::Printf("CAlfRsSendBuffer::SendL, offset %d",lastWrittenOffset );
if ( iFlushBufferTimer )
{
iFlushBufferTimer->Cancel();
}
iAlfBridgerClient->SendAsynchronous( EAlfBridgerAsyncronousData, args, iStatus );
+ iCompositionModified = EFalse;
if ( aStatus ) // aStatus is null, if this was event notification and not drawing
{
--- a/uiacceltk/hitchcock/Client/src/alfvisual.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/Client/src/alfvisual.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -1611,6 +1611,7 @@
TBuf8<1> dumDum;
TAlfVisualEffectParams params;
params.iFileName = aEffectFile;
+ params.iHandle = Identifier();
TPckg<TAlfVisualEffectParams> paramsPckg(params);
@@ -1640,6 +1641,7 @@
TAlfVisualEffectParams params;
params.iFileName = aEffectFile;
params.iGroupHandle = aGroupHandle;
+ params.iHandle = Identifier();
TPckg<TAlfVisualEffectParams> paramsPckg(params);
--- a/uiacceltk/hitchcock/CommonInc/alfrenderstageutils.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/CommonInc/alfrenderstageutils.h Tue Apr 27 17:34:42 2010 +0300
@@ -94,6 +94,7 @@
EAlfBridgeCreated, // data: MAlfBridge
EAlfNativeWindowCreated, // data: TAlfNativeWindowData
ESetWindowTreeObserver, // data: MAlfCompositionAgnosticWindowTreeObserver*
+ EEndCallbackInitiated, // Renderstage above us has started progressing End(), i.e. rendering UI surface, no data
EExternalize, // externalize complete state data: Todo
EInternalize // reset the state from data data: Todo
};
@@ -102,6 +103,7 @@
virtual void WriteIntsL(TUint8 aCommand, TInt aCount, TInt* aArray) = 0;
virtual RAlfBridgerClient* Client() = 0;
virtual void SetOrientation(TInt aOrientation) = 0;
+ virtual void SetCompositionModified() = 0;
};
/**
--- a/uiacceltk/hitchcock/ServerCore/Inc/alfbridge.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Inc/alfbridge.h Tue Apr 27 17:34:42 2010 +0300
@@ -298,7 +298,18 @@
void LayoutSwitchComplete();
RAlfBridgerClient* BridgerClient();
-
+
+ /**
+ * Refresh requested. This is meant to be used by alfstreamerbridge when
+ * frame has ended.
+ */
+ void RefreshNow(TBool aSyncWait);
+
+ /**
+ * Asynchronous refresh when in SW rendering mode.
+ */
+ void AsynchRefresh();
+
private:
@@ -788,6 +799,13 @@
TBool HasActivePaintedAreas( CHuiCanvasVisual& aVisual, TBool aIncludeChildren );
TBool HasActiveFadedChildren( CHuiCanvasVisual& aVisual );
+ /*
+ * This is for updating all the layout that are created to correspond the window server window groups.
+ * This should be called immediately when layout switch happens. Layout extents must be update then otherwise
+ * visibility calculations will clip to old sizes.
+ */
+ void UpdateRootVisualsToFullscreen();
+
private:
RPointerArray<CAlfScreen> iAlfScreens;
@@ -1002,6 +1020,8 @@
TInt activevisualcount;
TInt passivevisualcount;
#endif
+
+ CPeriodic* iManualRefreshTimer;
};
#endif // __ALF_BRIDGE_H__
\ No newline at end of file
--- a/uiacceltk/hitchcock/ServerCore/Inc/alfhierarchymodel.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Inc/alfhierarchymodel.h Tue Apr 27 17:34:42 2010 +0300
@@ -83,7 +83,7 @@
void RequestPacketEndCallback( TInt aOffset );
- void RequestFrameEndCallback();
+ void RequestFrameEndCallback(TBool aCompositionModified);
RHashMap<TUint32,CNodeHashStruct> iNodeHashArray;
@@ -144,7 +144,7 @@
*
* @since S60 ?S60_version
*/
- void ExecuteCommandsL();
+ void ExecuteCommandsL(TBool aCompositionModified = EFalse);
// Commands from window tree oberver at renderstage
void DoNodeCreatedL();
--- a/uiacceltk/hitchcock/ServerCore/Inc/alfstreamerbridge.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Inc/alfstreamerbridge.h Tue Apr 27 17:34:42 2010 +0300
@@ -253,7 +253,7 @@
*
* @since S60 5.0
*/
- void StartNewBlock();
+ void StartNewBlock(TBool aCompositionModified);
/**
* StartNewBlock
--- a/uiacceltk/hitchcock/ServerCore/Src/alfappserver.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Src/alfappserver.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -1464,4 +1464,8 @@
return result;
}
+TInt CAlfAppServer::GetLastActiveClient()
+ {
+ return iLastActiveClientWg;
+ }
--- a/uiacceltk/hitchcock/ServerCore/Src/alfappservercore.mmp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Src/alfappservercore.mmp Tue Apr 27 17:34:42 2010 +0300
@@ -24,6 +24,7 @@
MACRO ALF_USE_CANVAS
+MACRO ALF_DRAW_FRAME_BEFORE_END_CALLBACK
#define ALF_USE_CANVAS
// Enable this to add GetWinIdListL method to CAlfWindowManager API.
--- a/uiacceltk/hitchcock/ServerCore/Src/alfappui.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Src/alfappui.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -148,30 +148,42 @@
void RunL()
{
iSema.Wait();
+ TInt position = iPosition;
+ TInt parentId = iParentIdentifier;
+ iSema.Signal();
+ TBool goOn = EFalse;
if (iStatus.Int() == KErrNone)
{
- TRAPD(err, DoAdjustPositionL());
- if (err)
- {
- __ALFLOGSTRING1("ALF: WG Parent not found, err %d", err);
- }
- }
+ do {
+ TRAPD(err, DoAdjustPositionL(position, parentId));
+ if (err)
+ {
+ __ALFLOGSTRING1("ALF: WG Parent not found, err %d", err);
+ }
+ iSema.Wait();
+ goOn = (iPosition != position || iParentIdentifier != parentId);
+ position = iPosition;
+ parentId = iParentIdentifier;
+ iSema.Signal();
+ } while(goOn);
+ }
+ iSema.Wait();
DoActivate();
iSema.Signal();
}
- void DoAdjustPositionL()
+ void DoAdjustPositionL(TInt aPosition, TInt aParentIdentifier)
{
- __ALFLOGSTRING1("ALF: DoAdjustPositionL() %d", iPosition);
+ __ALFLOGSTRING1("ALF: DoAdjustPositionL() %d", aPosition);
- if (iPosition == CAlfAppServer::EAbsoluteBackground) // just for convenience
+ if (aPosition == CAlfAppServer::EAbsoluteBackground) // just for convenience
{
__ALFLOGSTRING("CAlfEventCatcher::DoAdjustPositionL - CAlfAppServer::EAbsoluteBackground");
iWindowGroup.SetOrdinalPosition(-1,ECoeWinPriorityNeverAtFront);
iWsSession.Flush();
return;
}
- else if (iPosition == CAlfAppServer::EAlfWindowSize ) // just for developer convenience
+ else if (aPosition == CAlfAppServer::EAlfWindowSize ) // just for developer convenience
{
__ALFLOGSTRING("CAlfEventCatcher::DoAdjustPositionL - CAlfAppServer::EAlfWindowSize");
// update window size when layout changes
@@ -183,7 +195,7 @@
TInt parentPriority =
- iWsSession.GetWindowGroupOrdinalPriority(iParentIdentifier);
+ iWsSession.GetWindowGroupOrdinalPriority(aParentIdentifier);
// perhaps we should maintain wg-list elsewhere
CArrayFixFlat<TInt>* wgs = new (ELeave) CArrayFixFlat<TInt>(1);
@@ -195,9 +207,9 @@
TInt wgCount = wgs->Count();
for (TInt i = 0; i < wgCount; i++)
{
- if (iParentIdentifier == wgs->At(i))
+ if (aParentIdentifier == wgs->At(i))
{
- if ( iPosition == CAlfAppServer::EOnTopOfParent )
+ if ( aPosition == CAlfAppServer::EOnTopOfParent )
{
pos = i;
}
@@ -432,11 +444,7 @@
{
iWsSession.ComputeMode(RWsSession::EPriorityControlDisabled);
RThread thread;
-#if defined(__EPOC32__)
- thread.SetProcessPriority(EPriorityForeground);
-#else
- thread.SetPriority(EPriorityAbsoluteForegroundNormal);
-#endif
+ thread.SetPriority(EPriorityAbsoluteForegroundNormal);
iScreenDevice =new(ELeave) CWsScreenDevice(iWsSession);
iScreenDevice->Construct(0); // For main display only
@@ -861,11 +869,7 @@
CHuiStatic::WsSession().ComputeMode(RWsSession::EPriorityControlDisabled);
RThread thread;
-#if defined(__EPOC32__)
- thread.SetProcessPriority(EPriorityForeground);
-#else
- thread.SetPriority(EPriorityAbsoluteForegroundNormal);
-#endif
+ thread.SetPriority(EPriorityAbsoluteForeground);
// delegates..
iData->iResourceManager = CAlfSrvResourceManager::NewL( *iData->iHuiEnv );
@@ -1492,6 +1496,12 @@
return iData->iServer->SrvSessionForControlGroup(aGroup);
}
+
+TInt CAlfAppUi::GetLastActiveClient()
+ {
+ return iData->iServer->GetLastActiveClient();
+ }
+
void CAlfAppUi::DoBlankScreen(const RMessage2& aMessage)
{
__ALFLOGSTRING("CAlfAppUi::DoBlankScreen >>");
--- a/uiacceltk/hitchcock/ServerCore/Src/alfbridge.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Src/alfbridge.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -91,13 +91,17 @@
const TInt KEffectCleanupDelayInMs = 10;
const TInt KPreventingCollisionOfIdsInSynchDrawRequests = 35;
-
+const TInt KRequestFrameSynchForComposition = -1; // bogus
+
+const TInt KAlfFSTaskSwapperAppStart = 1507;
_LIT8(KAlfWindowGroupContainerControlTag, "WGROUP");
#define USE_APPLICATION_ENDFULLSCREEN_TIMEOUT
// This debug option shows window groups in a grid
//#define ALF_DEBUG_VISUALIZE_WINDOWGROUP_ORDER
+// Timeout for manual refresh
+const TInt KAlfManualRefreshTimeout = 35000;
const TInt KFadeAction = 6000;
@@ -174,6 +178,7 @@
#endif
delete iCursorTimer;
delete iLayoutSwitchEffectCoordinator;
+ delete iManualRefreshTimer;
}
@@ -215,6 +220,8 @@
iOrphanStorage->ConstructL();
RegisterFadeEffectL();
+
+ iManualRefreshTimer = CPeriodic::NewL(CActive::EPriorityStandard);
}
// ---------------------------------------------------------------------------
@@ -787,6 +794,7 @@
// First HandleGfxEvent, then clear iWaitingWindowGroup.
+ __ALFFXLOGSTRING1("CAlfBridge::CreateControlGroupL - try triggering effect 0x%x", layout);
TBool failed = HandleGfxEventL( *iFullScreenEffectData, layout, fromLayout );
if ( iFullScreenEffectData )
{
@@ -795,6 +803,7 @@
if ( failed )
{
// Effect failed, reset state
+ __ALFFXLOGSTRING1("CAlfBridge::CreateControlGroupL - effect failed on layout 0x%x", layout);
HandleGfxStopEvent( EFalse ); // destroys iFullScreenEffectData
}
}
@@ -1355,7 +1364,7 @@
CAlfScreen* screen = iAlfScreens[aScreenNumber];
TRect fullscreen = TRect(TPoint(0,0), screen->Size());
- TBool fadeEffectInScreen = EFalse;
+ TBool checkFadeEffectInScreen = EFalse;
// Prepare SW render target (if needed)
@@ -1445,18 +1454,25 @@
// clear inactive flag if client has not made this controlgroup hidden
if(!(flags&EHuiVisualFlagUnderOpaqueHint))
{
- alfWindowGroupFoundVisible = ETrue;
if(iAppUi)
{
topMostAlfSrvSession = iAppUi->SrvSessionForControlGroup(controlgroup);
+
+ TInt clientWindowGroupId = topMostAlfSrvSession->ClientWindowGroup();
+ __ALFLOGSTRING1("Alf Application: clientWindowGroupId %d", clientWindowGroupId);
+ // checking the case if there are multiple alf application openend.
+ if (clientWindowGroupId == iAppUi->GetLastActiveClient())
+ {
+ __ALFLOGSTRING1("Alf Application: GetLastActiveClient %d", iAppUi->GetLastActiveClient());
+ alfWindowGroupFoundVisible = ETrue;
+ hostContainer->ClearFlags(EHuiVisualFlagInactive);
+ // just add the rect to covered region because alf draws solid background
+ iTempRegion.AddRect(fullscreen);
+ iTempRegion.Tidy();
+ fullscreenCovered = ETrue;
+ alfClientWindowGroupVisible = EFalse; // change flag so that we don't go in this branch again
+ }
}
- hostContainer->ClearFlags(EHuiVisualFlagInactive);
-
- // just add the rect to covered region because alf draws solid background
- 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
{
@@ -1501,21 +1517,12 @@
#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(EFalse);
- //embedded native alf application assumes that it should cover whole screen with alfcontent
+ // 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))
@@ -1525,7 +1532,6 @@
hasActiveVisualsInVisualTree, fullscreen, screen,
subTreeCovered, hasLayers, IsVisualOpaque(*layout),alfClientWindowGroupVisible );
}
-
else
{
hasActiveVisualsInVisualTree =
@@ -1537,11 +1543,21 @@
TBool hasFadeEffectsInVisualTree = (layout->CanvasFlags() & EHuiCanvasFlagExternalFadeExistsInsideVisualTree);
- if(!fullscreenCovered && alfClientWindowGroupVisible)
- {
- iTempRegion.AddRect(fullscreen);
- iTempRegion.Tidy();
- fullscreenCovered = ETrue;
+ // if native alf app is found visible and the client it self is not covering whole screen, we can assume that alf content
+ // fills the rest.
+ // this is for embedded native alf application cases. Otherwise chained window groups tend to
+ // flicker from time to time
+ // also if alfcontent is not hided below avkon content the fading effect would reveal alfconent
+ if(controlgroup.iAlfApp)
+ {
+ fullscreenCovered = IsRectCoveredByRegion(fullscreen, iTempRegion);
+ if(!fullscreenCovered )
+ {
+ iTempRegion.AddRect(fullscreen);
+ iTempRegion.Tidy();
+ fullscreenCovered = ETrue;
+ alfClientWindowGroupVisible = ETrue;
+ }
}
// If root visuals effect is marked as opaque, then add whole screen area as covered.
@@ -1560,7 +1576,7 @@
// are no more needed get removed.
if (hasActiveVisualsInVisualTree || (!hasActiveVisualsInVisualTree && hasFadeEffectsInVisualTree))
{
- fadeEffectInScreen = ETrue;
+ checkFadeEffectInScreen = ETrue;
// Prepare fade effects to whole visual tree below layout
PrepareFadeEffects( *layout );
@@ -1656,7 +1672,7 @@
// Finally, if there are fadeeffects applied to windowgroups, make sure first one does not
// blend itself, but other windowgroups do blend. Otherwise windowgrouops above others
// would clear the screen areas where they do not really draw.
- if (fadeEffectInScreen)
+ if (checkFadeEffectInScreen)
{
TBool firstFadedWindowGroupFound = EFalse;
for (TInt j=0; j<screen->iDisplay->Roster().Count() - screen->FixedControlGroupCount(); j++) // skip the topmost (effect) layer
@@ -2428,6 +2444,7 @@
{
HandleSetLayoutSwitchEffectL();
iAlfScreens[0]->iDisplay->SetOrientation(huiOrientation);
+ UpdateRootVisualsToFullscreen();
if (iAppUi)
{
iAppUi->AdjustWindowGroupPositionL(0,CAlfAppServer::EAlfWindowSize); // hackish, but one way to enforce alf window resizing
@@ -2471,6 +2488,8 @@
__ALFLOGSTRING1("CAlfBridge::DoDispatchL: Received Unknown op: %d",data.iOp);
}
}
+
+ AsynchRefresh();
}
}
@@ -4008,6 +4027,37 @@
return has;
}
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CAlfBridge::UpdateRootVisualsToFullscreen()
+ {
+ if (!iAlfScreens.Count())
+ {
+ return;
+ }
+
+ // update all the layouts even inactive ones.
+ CAlfScreen* screen = iAlfScreens[0];
+ TRect fullscreen = TRect(TPoint(0,0), screen->Size());
+ for (TInt j=screen->iDisplay->Roster().Count() - screen->FixedControlGroupCount(); j>=0; j--)
+ {
+ CHuiControlGroup& controlgroup = screen->iDisplay->Roster().ControlGroup(j);
+ CHuiControl& control = controlgroup.Control(0);
+
+ if( control.Role() == EAlfWindowGroupContainer)
+ {
+ // Only update layout which are made to correspond window groups.
+ // Layouts that fullscreen effects are applied to
+ CHuiCanvasVisual* layout = (CHuiCanvasVisual*)&control.Visual(0);
+ layout->SetPos(fullscreen.iTl);
+ layout->SetSize(fullscreen.Size());
+ }
+ }
+ }
+
+
// ---------------------------------------------------------------------------
// SetupFadeEffectL
@@ -4353,6 +4403,10 @@
{
return aEngine->FxmlUsesInput1(aFileName);
}
+TBool FxmlHasOpaqueHint(CHuiFxEngine *aEngine, const TDesC &aFileName)
+ {
+ return aEngine->FxmlUsesOpaqueHint(aFileName);
+ }
// ---------------------------------------------------------------------------
// StoreLayoutIfRequiredByEffectL
@@ -4441,6 +4495,7 @@
case AknTransEffect::EApplicationStartRect:
case AknTransEffect::EApplicationStartSwitch:
case AknTransEffect::EApplicationStartSwitchRect:
+ case KAlfFSTaskSwapperAppStart:
{
aToLayout->iOpacity.Set(0.0f); // these are meant for applications that are not yet ready to be drawn, but possible already on the foreground
FreezeLayoutUntilEffectDestroyedL(aFromLayout, aEvent.iHandle);
@@ -4545,7 +4600,7 @@
}
__ALFFXLOGSTRING1("CAlfBridge::HandleGfxEventL - Active effect group: %d", activeEffectGroup);
effectFlags = KHuiFxDelayRunUntilFirstFrameHasBeenDrawn;
- if (NeedsStoredBuffers(iHuiEnv->EffectsEngine(), *aEvent.iEffectName))
+ if (FxmlHasOpaqueHint(iHuiEnv->EffectsEngine(), *aEvent.iEffectName))
{
// Performance improvement, but this would be better to be a special hint param in the fxml
effectFlags |= KHuiFxOpaqueHint;
@@ -4747,16 +4802,12 @@
__ALFFXLOGSTRING("CAlfBridge::HandleGfxEffectsL - WARNING - Another fullscreen effect to different app. Deleting the previous ongoing effect");
RemoveEffectFromApp(iFullScreenEffectData->iToSecureId, iFullScreenEffectData->iToWg);// Fullscreen effect for another app has arrived, and the previous has not finished and abort effect was not called.
RemoveEffectFromApp(iFullScreenEffectData->iFromSecureId, iFullScreenEffectData->iFromWg);
+ __ALFFXLOGSTRING2("CAlfBridge::HandleGfxEffectsL - Effect request has changed from appUid 0x%x to 0x%x. Cancel previous effect.", iFullScreenEffectData->iToAppId, fxData->iToAppId);
+ RemoveEffectFromApp(iFullScreenEffectData->iToAppId);
// 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;
+ delete iFullScreenEffectData;
iFullScreenEffectData = fxData;
iFullScreenEffectData->iAppStartScreenshotItemHandle = fxData->iHandle;
@@ -4891,6 +4942,7 @@
CHuiLayout* toLayout = control.VisualCount() > 0 ? (CHuiLayout*)&control.Visual(0) : NULL;
if (!toLayout)
{
+ // no point starting effect, if the layout is still inactive.
return EFalse;
}
TBool opaque = ETrue; // in app start case the layout is propably not opaque. Fake it.
@@ -5113,7 +5165,13 @@
CHuiLayout& layout = static_cast<CHuiLayout&> (aSourceLayout->Visual(i));
AddToEffectLayoutContainerL(aEffectHandle, &layout, NULL, aEffectControl, aItemsDestroyed, EFalse,aIsExitEffect, aCanDestroyOrHideImmediately );
}
+ TInt oldItemsDestroyed = aItemsDestroyed;
AddEffectItemL(aEffectHandle, &sourceVisual, aTargetLayout, aEffectControl, EFalse, aItemsDestroyed, aIsExitEffect, aCanDestroyOrHideImmediately);
+ if (oldItemsDestroyed != aItemsDestroyed)
+ {
+ // Visual was destroyed. If so, then we must adjust index.
+ --i;
+ }
}
__ALFFXLOGSTRING2("CAlfBridge::AddToEffectLayoutContainerL 0x%x end of children", aSourceLayout, aSourceLayout->Count());
}
@@ -5269,6 +5327,11 @@
// effect will start delayed anyway when it is syncronized. this flag would break syncronization between effects.
effectFlags = KHuiFxDelayRunUntilFirstFrameHasBeenDrawn;
+ if (FxmlHasOpaqueHint(iHuiEnv->EffectsEngine(), *aEvent.iEffectName))
+ {
+ effectFlags |= KHuiFxOpaqueHint;
+ }
+
TInt activeEffectGroup = engine->ActiveGroupEffect();
if (activeEffectGroup != KErrNotFound)
{
@@ -5972,16 +6035,27 @@
iAlfScreens[i]->iDisplay->SetForegroundBitmapL( iAlfScreens[i]->iSwRenderingTarget );
CleanupStack::Pop(texture);
iAlfScreens[i]->iDisplay->SetForegroundTexture(texture);
+#ifdef ALF_DRAW_FRAME_BEFORE_END_CALLBACK
+ iHuiEnv->SetRefreshMode(EHuiRefreshModeManual);
+#endif // #ifdef ALF_DRAW_FRAME_BEFORE_END_CALLBACK
}
else
{
iAlfScreens[i]->iDisplay->SetForegroundBitmapL(NULL);
iAlfScreens[i]->iDisplay->SetForegroundTexture(NULL);
+#ifdef ALF_DRAW_FRAME_BEFORE_END_CALLBACK
+ iHuiEnv->SetRefreshMode(EHuiRefreshModeAutomatic);
+#endif // #ifdef ALF_DRAW_FRAME_BEFORE_END_CALLBACK
}
// SetCapturingBufferL is called from HandleVisualVisibility.
iAlfScreens[i]->SetVisualTreeVisibilityChanged(ETrue);
}
+
+ if (!iSwRenderingEnabled && iManualRefreshTimer)
+ {
+ iManualRefreshTimer->Cancel();
+ }
}
// ---------------------------------------------------------------------------
@@ -6195,7 +6269,11 @@
//
void CAlfBridge::Synchronized(TInt aId)
{
- if(aId == iIdForLayoutSwitchFrameSync)
+ if (aId == KRequestFrameSynchForComposition)
+ {
+ return;
+ }
+ else if (aId == iIdForLayoutSwitchFrameSync)
{
// send notification to alfstreamer server about
if (iActivated)
@@ -6334,48 +6412,7 @@
// Dont mess with alf control group visuals, alf session handling does it for us
if (control.Role() == EAlfSessionContainer)
{
- CHuiLayout* hostContainer = control.ContainerLayout( NULL );
- TInt flags = hostContainer->Flags();
- if (!fullscreenCovered)
- {
-
- if(!(flags&EHuiVisualFlagUnderOpaqueHint))
- {
- alfWindowGroupFoundVisible = ETrue;
- if(iAppUi)
- {
- topMostAlfSrvSession = iAppUi->SrvSessionForControlGroup(controlgroup);
- }
-
- // just add the rect to covered region because alf draws solid background
- iTempRegion.AddRect(fullscreen);
- iTempRegion.Tidy();
- fullscreenCovered = ETrue;
- }
- }
- else if(!alfWindowGroupFoundVisible || flags&EHuiVisualFlagUnderOpaqueHint)
- {
- // this alf session control group should not be visible anymore because avkon application is on top
- // -> change to inactive
-
- }
- else if(!(flags&EHuiVisualFlagUnderOpaqueHint)) // alf app covers full screen
- {
- // check if current controlgroup belongs to same srvsession as the topmost visible alf session container
- CAlfAppSrvSessionBase* alfsrvsession = NULL;
- if(iAppUi)
- {
- alfsrvsession = iAppUi->SrvSessionForControlGroup(controlgroup);
- }
- if(topMostAlfSrvSession!=NULL && topMostAlfSrvSession == alfsrvsession)
- {
-
- }
- else
- {
-
- }
- }
+ // Skip alf session containers until we have better heuristic implement for them
continue;
}
@@ -6540,8 +6577,9 @@
if (!canvasVisual->LayerExtent().IsEmpty())
{
- canvasVisual->ClearCanvasFlags(EHuiCanvasFlagSurfaceVisible);
- canvasVisual->SetCanvasFlags(EHuiCanvasFlagSurfaceInvisible);
+ // Force update
+ canvasVisual->ClearCanvasFlags( EHuiCanvasFlagSurfaceInvisible );
+ canvasVisual->ClearCanvasFlags( EHuiCanvasFlagSurfaceVisible );
}
}
}
@@ -6588,5 +6626,39 @@
return 0;
}
+void CAlfBridge::RefreshNow(TBool aSyncWait)
+ {
+ if (!iHuiEnv)
+ {
+ return;
+ }
+
+ if (iSwRenderingEnabled && iManualRefreshTimer)
+ {
+ iManualRefreshTimer->Cancel();
+ }
+
+ if (aSyncWait)
+ {
+ iHuiEnv->Synchronize( KRequestFrameSynchForComposition, this );
+ }
+
+ iHuiEnv->RefreshCallBack((TAny*)iHuiEnv);
+ }
+
+static TInt DoAlfBridgeRefreshNow(TAny* aAny)
+ {
+ CAlfBridge* bridge = static_cast<CAlfBridge*>(aAny);
+ bridge->RefreshNow(EFalse);
+ return KErrNone;
+ }
+
+void CAlfBridge::AsynchRefresh()
+ {
+ if (iSwRenderingEnabled && iManualRefreshTimer && !iManualRefreshTimer->IsActive())
+ {
+ iManualRefreshTimer->Start(KAlfManualRefreshTimeout, KAlfManualRefreshTimeout, TCallBack(DoAlfBridgeRefreshNow, this));
+ }
+ }
// end of file
--- a/uiacceltk/hitchcock/ServerCore/Src/alfeffectutils.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Src/alfeffectutils.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -21,8 +21,6 @@
#include <alflogger.h>
const TInt KRosterFreezeEndTimeoutInMs = 100;
-const TInt KFirstTimeoutForApplicationEndFullScreenInMs = 20;
-const TReal KMinimumPaintedAreaBeforeForcedEffect = 0.75;
// ---------------------------------------------------------
// CAlfRosterFreezeEndTimer
--- a/uiacceltk/hitchcock/ServerCore/Src/alfhierarchymodel.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Src/alfhierarchymodel.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -185,10 +185,10 @@
// RequestFrameEndCallback
// ---------------------------------------------------------------------------
//
-void CAlfHierarchyModel::RequestFrameEndCallback( )
+void CAlfHierarchyModel::RequestFrameEndCallback(TBool aCompositionModified)
{
- __ALFLOGSTRING( "CAlfHierarchyModel::RequestFrameEndCallback" );
- iServer.Bridge()->StartNewBlock();
+ __ALFLOGSTRING1( "CAlfHierarchyModel::RequestFrameEndCallback, composition modified: %d", aCompositionModified);
+ iServer.Bridge()->StartNewBlock(aCompositionModified);
}
// ---------------------------------------------------------------------------
// HandleMessageL
@@ -216,7 +216,7 @@
{
if ( iChunk.Handle() )
{
- ExecuteCommandsL();
+ ExecuteCommandsL(aMessage.Int1());
if ( iBatchAlreadyCommited )
{
// This may happen, if alfstreamerbridge happens to process the commands (containing the EAlfCommitBatch)
@@ -398,7 +398,7 @@
// ExecuteCommandsL
// ---------------------------------------------------------------------------
//
-void CAlfHierarchyModel::ExecuteCommandsL( )
+void CAlfHierarchyModel::ExecuteCommandsL( TBool aCompositionModified )
{
if ( !iStream )
{
@@ -564,7 +564,7 @@
case EAlfCommitBatch:
{
- RequestFrameEndCallback();
+ RequestFrameEndCallback(aCompositionModified);
break;
}
#ifdef ALF_DEBUG_TRACK_DRAWING
@@ -1097,6 +1097,9 @@
{
// SetLayerUsesAplhaFlag is not supported for image visual
node->Window()->SetLayerUsesAplhaFlag( enabled );
+#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+ node->Window()->SetTransparencyAlphaChannel( enabled );
+#endif // #ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
}
else if( node ) // this would mean that node has being orphaneded but not yet deleted
{
--- a/uiacceltk/hitchcock/ServerCore/Src/alfstreamerbridge.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Src/alfstreamerbridge.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -29,8 +29,8 @@
#endif
-
-#define ALF_DRAW_FRAME_BEFORE_END_CALLBACK
+// From MMP macro nowadays
+//#define ALF_DRAW_FRAME_BEFORE_END_CALLBACK
// ---------------------------------------------------------------------------
// constructor
@@ -257,7 +257,7 @@
CAlfBridge* bridge = dynamic_cast<CAlfBridge*>(iObserver);
if (bridge)
{
- bridge->iHuiEnv->RefreshCallBack((TAny*)bridge->iHuiEnv);
+ bridge->RefreshNow(iMessages[iStatus.Int()].iInt2);
}
} // fall through
#endif
@@ -305,6 +305,15 @@
switch ( operation2 )
{
case EAlfRequestCommitBatch:
+#ifdef ALF_DRAW_FRAME_BEFORE_END_CALLBACK
+ {
+ CAlfBridge* bridge = dynamic_cast<CAlfBridge*>(iObserver);
+ if (bridge)
+ {
+ bridge->RefreshNow(iMessages[iQueue[0]].iInt2);
+ }
+ } // fall through
+#endif
case EAlfRequestCommandReadNotification:
case EAlfReleaseTemporaryChunk:
{
@@ -365,12 +374,12 @@
//
// ---------------------------------------------------------------------------
//
-void CAlfStreamerBridge::StartNewBlock()
+void CAlfStreamerBridge::StartNewBlock(TBool aCompositionModified)
{
// 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 );
- AddData(EAlfRequestCommitBatch,0,0,0);
+ AddData(EAlfRequestCommitBatch,0,aCompositionModified,0);
}
// ---------------------------------------------------------------------------
--- a/uiacceltk/hitchcock/ServerCore/Src/alfvisualhandlers.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Src/alfvisualhandlers.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -769,7 +769,7 @@
if (engine)
{
CHuiFxEffect* effect = NULL;
- engine->LoadEffectL( params->iFileName, effect, iVisual->Effectable() );
+ engine->LoadEffectL( params->iFileName, effect, iVisual->Effectable(), NULL , NULL, params->iHandle, KHuiFxDelayRunUntilFirstFrameHasBeenDrawn );
// The effect will be automatically set to the visual if parsing succeeds
}
break;
@@ -784,8 +784,8 @@
CHuiFxEffect* effect = NULL;
// this will add the group, if it does not exist already
// Begin and End group events are supposed to come through GfxTransEffect API.
- engine->BeginGroupEffect(groupHandle);
- engine->LoadGroupEffectL( params->iFileName, effect, iVisual->Effectable(),groupHandle );
+ engine->BeginGroupEffect(groupHandle);
+ engine->LoadGroupEffectL( params->iFileName, effect, iVisual->Effectable(),groupHandle, NULL, NULL, params->iHandle, KHuiFxDelayRunUntilFirstFrameHasBeenDrawn );
// The effect will be automatically set to the visual if parsing succeeds
}
break;
--- a/uiacceltk/hitchcock/backgroundanim/inc/bganimhost.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/backgroundanim/inc/bganimhost.h Tue Apr 27 17:34:42 2010 +0300
@@ -70,6 +70,8 @@
void HandleScreenSaverEvent();
TBool GetPluginConfigurationL();
static TInt ScreenSaverCallback(TAny* aPtr);
+ void StartSensorsL();
+ void StopSensors();
private:
// windowing stuff
@@ -97,6 +99,7 @@
TBool iEGLInitialized;
TBool iSurfaceInitialized;
+ TBool iHiddenDueSC;
// composition API
CAlfCompositionSource* iCompSource;
--- a/uiacceltk/hitchcock/backgroundanim/inc/sensor.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/backgroundanim/inc/sensor.h Tue Apr 27 17:34:42 2010 +0300
@@ -10,12 +10,15 @@
public:
static CSensorListener* NewL(MSensrvDataListener* aDataListener, TUint32 aSensorType);
virtual ~CSensorListener();
+ void StopListening();
+ void StartListeningL();
protected:
void ConstructL(TUint32 aSensorType);
CSensorListener(MSensrvDataListener* aDataListener);
private:
MSensrvDataListener* iDataListener;
CSensrvChannel* iSensrvChannel;
+ TBool iListening;
};
#endif
\ No newline at end of file
--- a/uiacceltk/hitchcock/backgroundanim/src/bganimhost.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/backgroundanim/src/bganimhost.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -481,6 +481,7 @@
if (!serr)
{
iSensorListeners.Append(listener);
+ StartSensorsL();
}
}
}
@@ -524,7 +525,7 @@
lValOfNoUse);
if (err == KErrNotFound)
{
- iTimer->CallBack(1);
+ iTimer->CallBack(500);
return;
}
}
@@ -600,14 +601,16 @@
iTimerRunning = EFalse;
iPlugin->gpuresourcesavailable(0);
ReleaseWindowSurface(EFalse);
+ StopSensors();
}
void CBgAnimHost::CompositionTargetVisible()
{
- if (iSurfaceInitialized)
+ if (iSurfaceInitialized || iHiddenDueSC)
{
// don't bother if we are already in
- // a correct state..
+ // a correct state, or if we are hidden by
+ // the screensaver
return;
}
@@ -626,6 +629,7 @@
iTimer->CallBack(1);
iTimerRunning = ETrue;
}
+ TRAP_IGNORE(StartSensorsL());
}
void CBgAnimHost::HandleScreenSaverEvent()
@@ -635,24 +639,33 @@
if (scStatus)
{
// screensaver is ON
- if (iTimerRunning)
- {
- iTimer->Cancel();
- iTimerRunning = EFalse;
- }
+ iHiddenDueSC = ETrue;
+ CompositionTargetHidden();
}
else
{
// screensaver is OFF
- if (!iTimerRunning && iSurfaceInitialized)
- {
- iTimerRunning = ETrue;
- iTimer->CallBack(1);
- }
+ iHiddenDueSC = EFalse;
+ CompositionTargetVisible();
}
#endif
}
+void CBgAnimHost::StartSensorsL()
+ {
+ for (TInt count = 0; count < iSensorListeners.Count(); count++)
+ {
+ iSensorListeners[count]->StartListeningL();
+ }
+ }
+
+void CBgAnimHost::StopSensors()
+ {
+ for (TInt count = 0; count < iSensorListeners.Count(); count++)
+ {
+ iSensorListeners[count]->StopListening();
+ }
+ }
TInt CBgAnimHost::ScreenSaverCallback(TAny* aPtr)
{
CBgAnimHost* me = (CBgAnimHost*) aPtr;
--- a/uiacceltk/hitchcock/backgroundanim/src/sensor.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/backgroundanim/src/sensor.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -28,8 +28,6 @@
if (channelInfoList.Count())
{
iSensrvChannel = CSensrvChannel::NewL(channelInfoList[0]);
- iSensrvChannel->OpenChannelL();
- iSensrvChannel->StartDataListeningL( iDataListener, 1,1,0);
}
channelInfoList.Close();
@@ -43,14 +41,33 @@
CSensorListener::~CSensorListener()
{
- if (iSensrvChannel)
+ StopListening();
+ delete iSensrvChannel;
+
+ iSensrvChannel = NULL;
+ }
+
+void CSensorListener::StopListening()
+ {
+ if (iSensrvChannel && iListening)
{
- iSensrvChannel->StopDataListening();
+ iSensrvChannel->StopDataListening();
iSensrvChannel->CloseChannel();
+ iListening = EFalse;
}
-
- delete iSensrvChannel;
}
+
+void CSensorListener::StartListeningL()
+ {
+ if (iSensrvChannel && !iListening)
+ {
+ iSensrvChannel->OpenChannelL();
+ iSensrvChannel->StartDataListeningL( iDataListener, 5,10,0);
+ iListening = ETrue;
+ }
+ }
+
+
--- a/uiacceltk/hitchcock/coretoolkit/BWINS/hitchcocku.DEF Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/BWINS/hitchcocku.DEF Tue Apr 27 17:34:42 2010 +0300
@@ -1596,4 +1596,6 @@
?SetSecureId@CHuiControlGroup@@QAEXH@Z @ 1595 NONAME ; void CHuiControlGroup::SetSecureId(int)
?HasTransParentClear@CHuiCanvasVisual@@QBEHXZ @ 1596 NONAME ; int CHuiCanvasVisual::HasTransParentClear(void) const
?AddEffectToGroup@CHuiFxEngine@@QAEHH@Z @ 1597 NONAME ; int CHuiFxEngine::AddEffectToGroup(int)
+ ?FxmlUsesOpaqueHint@CHuiFxEngine@@QAEHABVTDesC16@@@Z @ 1598 NONAME ; int CHuiFxEngine::FxmlUsesOpaqueHint(class TDesC16 const &)
+ ?InitializeL@CHuiCanvasRenderBuffer@@UAEXABVTSize@@H@Z @ 1599 NONAME ; void CHuiCanvasRenderBuffer::InitializeL(class TSize const &, int)
--- a/uiacceltk/hitchcock/coretoolkit/eabi/hitchcocku.DEF Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/eabi/hitchcocku.DEF Tue Apr 27 17:34:42 2010 +0300
@@ -1997,4 +1997,6 @@
_ZN16CHuiControlGroup8SecureIdEv @ 1996 NONAME
_ZNK16CHuiCanvasVisual19HasTransParentClearEv @ 1997 NONAME
_ZN12CHuiFxEngine16AddEffectToGroupEi @ 1998 NONAME
+ _ZN12CHuiFxEngine18FxmlUsesOpaqueHintERK7TDesC16 @ 1999 NONAME
+ _ZN22CHuiCanvasRenderBuffer11InitializeLERK5TSizei @ 2000 NONAME
--- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxConstants.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxConstants.h Tue Apr 27 17:34:42 2010 +0300
@@ -94,7 +94,7 @@
// parameter for visual
_LIT(KLitSrc, "src" ); // source for the effect
-
+_LIT(KLitOpaque, "opaque");
_LIT(KLitBlending, "blending" );
_LIT(KLitParam, "param" );
_LIT(KLitReplace, "replace" );
@@ -129,6 +129,8 @@
_LIT(KLitAccelerate, "accelerate");
_LIT(KLitImpulse, "impulse");
*/
+_LIT(KLitTrue,"true");
+_LIT(KLitFalse,"false");
_LIT(KLitAt, "at" );
_LIT(KLitMarker, "marker" );
_LIT(KLitLoopStart, "loop_start" );
--- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEffect.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEffect.h Tue Apr 27 17:34:42 2010 +0300
@@ -74,6 +74,17 @@
*/
const TInt KHuiFxReadyAndWaitingGroupToStartSyncronized = 0x800;
+/**
+ * This applies only to group effects. Visual has drawn one frame after the
+ * effect was added to the visual.
+ */
+const TInt KHuiReadyToDrawNotified = 0x1000;
+
+/**
+ * Effect observer has been called once.
+ */
+const TInt KHuiEffectObserverNotified = 0x2000;
+
class MAlfGfxEffectObserver
{
public:
@@ -96,7 +107,15 @@
IMPORT_C TBool VisualArea(TRect& aRect) const;
IMPORT_C TBool Changed();
IMPORT_C void SetEffectEndObserver( MAlfGfxEffectObserver* aEffectEndObserver, TInt aHandle );
- void NotifyEffectEndObserver();
+
+ /**
+ * NotifyEffectEndObserver
+ *
+ * @return ETrue, if effect observer was notified.
+ * EFalse, if effect does not have observer, but other notification is required (alf application
+ * effects.
+ */
+ TBool NotifyEffectEndObserver();
IMPORT_C TBool IsAnimated() const;
IMPORT_C TBool IsTransformed() const;
@@ -153,7 +172,9 @@
TBool CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque);
void FxmlVisualInputs(RArray<THuiFxVisualSrcType> &aArray);
-
+
+ TBool FxmlUsesOpaqueHint() const;
+
TInt Handle() const
{
return iHandle;
@@ -189,7 +210,6 @@
TInt iFramesDrawn;
TReal32 iElapsedTime;
- TBool iNotifiedEffectReady;
};
#endif /*HUIFXEFFECT_H_*/
--- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEffectCache.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEffectCache.h Tue Apr 27 17:34:42 2010 +0300
@@ -40,6 +40,8 @@
virtual void ParsingEndedBefore()=0;
virtual void ParsingEndedAfter(MHuiFxEffectCacheNode *aCached)=0;
virtual TBool FxmlUsesInput1()=0;
+ virtual TBool FxmlUsesOpaqueHint() const=0;
+
virtual void Delete()=0;
};
@@ -53,8 +55,9 @@
IMPORT_C void UnUse(MHuiFxEffectCacheNode *aNode);
IMPORT_C ~CHuiFxEffectCache();
void ParsingEnded(TInt aHandle);
- MHuiFxEffectCacheNode *FindCached(const TDesC &aId);
+ MHuiFxEffectCacheNode *FindCached(const TDesC &aId) const;
TBool FxmlUsesInput1(const TDesC &aFileName);
+ TBool FxmlUsesOpaqueHint(const TDesC &aFileName) const;
private:
struct IDNode
{
@@ -104,6 +107,7 @@
void ParsingEndedBefore();
void ParsingEndedAfter(MHuiFxEffectCacheNode *aCached);
TBool FxmlUsesInput1();
+ TBool FxmlUsesOpaqueHint() const;
void Delete();
private:
--- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEffectParser.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEffectParser.h Tue Apr 27 17:34:42 2010 +0300
@@ -92,6 +92,7 @@
THuiFxFilterType GetFilterTypeL( CMDXMLNode* aNode );
THuiFxReferencePoint GetReferencePointL( CMDXMLNode* aNode, TReal32& aRefValue, TBool& aNeedRefValue );
THuiFxVisualSrcType GetSrcTypeL( CMDXMLNode* aNode, TPtrC16& aBitmap );
+ TBool GetOpaqueHintL( CMDXMLNode *aNode );
TReal32 ParseFloatValueL(CMDXMLNode* aNode);
TRgb ParseColorValueL(CMDXMLNode* aNode);
TReal32 ParseFloatAttributeL(CMDXMLNode* aNode, const TDesC& aName, TBool aMustExist = ETrue);
--- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEngine.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxEngine.h Tue Apr 27 17:34:42 2010 +0300
@@ -114,7 +114,7 @@
TInt aFlags = 0 );
IMPORT_C TBool FxmlUsesInput1(const TDesC &aFileName);
-
+ IMPORT_C TBool FxmlUsesOpaqueHint(const TDesC &aFileName);
IMPORT_C void AdvanceTime(TReal32 aElapsedTime);
--- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxGroupLayer.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxGroupLayer.h Tue Apr 27 17:34:42 2010 +0300
@@ -51,6 +51,7 @@
TInt LayerCount() const;
CHuiFxLayer& Layer(TInt aIndex) const;
void FxmlVisualInputs(RArray<THuiFxVisualSrcType> &aArray);
+ TBool FxmlUsesOpaqueHint() const;
virtual void EnableMarginApplyChildren(TBool aEnable);
virtual void SetAlwaysReadSurfacePixels(TBool aAlwaysReadSurfacePixels);
--- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxLayer.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxLayer.h Tue Apr 27 17:34:42 2010 +0300
@@ -56,6 +56,7 @@
IMPORT_C virtual void SetExtRect( TRect *aExtRect )=0;
IMPORT_C virtual void SetVisual( CHuiVisual *aVisual )=0;
IMPORT_C virtual void SetVisual( MHuiEffectable *aVisual )=0;
+ virtual TBool FxmlUsesOpaqueHint() const { return EFalse; }
IMPORT_C void CopyFromL(const CHuiFxLayer *aOldLayer);
--- a/uiacceltk/hitchcock/coretoolkit/inc/HuiFxVisualLayer.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/inc/HuiFxVisualLayer.h Tue Apr 27 17:34:42 2010 +0300
@@ -51,6 +51,9 @@
IMPORT_C void SetVisual( MHuiEffectable *aVisual );
void FxmlVisualInputs(RArray<THuiFxVisualSrcType> &aArray);
+ void SetFxmlUsesOpaqueHint(TBool aValue);
+ TBool FxmlUsesOpaqueHint() const;
+
protected:
IMPORT_C void ConstructL(MHuiEffectable* aVisual);
@@ -93,7 +96,7 @@
HBufC* iExtBitmapFile;
TReal32 iOpacity;
-
+ TBool iOpaqueHint;
};
#endif /*HUIFXVISUALLAYER_*/
--- a/uiacceltk/hitchcock/coretoolkit/inc/huicanvasrenderbuffer.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/inc/huicanvasrenderbuffer.h Tue Apr 27 17:34:42 2010 +0300
@@ -80,6 +80,13 @@
*/
IMPORT_C virtual void Copy(TPoint aPoint);
+ /**
+ * Initializes render buffer, with clear option.
+ * @param aSize size of render buffer.
+ * @param aClear contents of render buffer are cleared even if alredy initialized.
+ */
+ IMPORT_C virtual void InitializeL(const TSize& aSize, TBool aClear);
+
protected:
TSize iSize;
--- a/uiacceltk/hitchcock/coretoolkit/inc/huicanvastexturecache.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/inc/huicanvastexturecache.h Tue Apr 27 17:34:42 2010 +0300
@@ -398,7 +398,7 @@
TInt CalculateTotalCanvasRenderBufferUsageInKbytes();
- CHuiCanvasRenderBufferImage* ReUseReleasedRenderBuffer(TSize aSizehint);
+ CHuiCanvasRenderBufferImage* ReUseReleasedRenderBufferL(TSize aSizehint);
TBool IsLowMemoryStateEnabled() const;
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiFxVg10OffscreenRenderbuffer.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiFxVg10OffscreenRenderbuffer.h Tue Apr 27 17:34:42 2010 +0300
@@ -57,7 +57,8 @@
EGLContext iSavedContext;
EGLSurface iSavedReadSurface;
EGLSurface iSavedDrawSurface;
- VGImage iRotatedImage;
+ VGImage iRotatedImage;
+ TSize iRotatedImageSize;
TEGLState iPreviousEGLState;
};
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiFxVg10OnscreenRenderbuffer.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiFxVg10OnscreenRenderbuffer.h Tue Apr 27 17:34:42 2010 +0300
@@ -46,6 +46,10 @@
protected:
void ConstructL(CHuiVg10RenderPlugin& aPlugin, CHuiVg10RenderSurface& aSurface);
void PrepareForReuse(const TSize& /* aReusedRect */);
+
+ void CreateVgImage();
+ void ReleaseVgImage();
+
private:
CHuiVg10RenderPlugin* iPlugin;
CHuiVg10RenderSurface* iSurface;
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiVg10RenderPlugin.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiVg10RenderPlugin.h Tue Apr 27 17:34:42 2010 +0300
@@ -259,32 +259,37 @@
/**
* Creates a new instance of a canvas graphics context.
*/
- virtual CHuiCanvasGc* CreateCanvasGcL();
+ virtual CHuiCanvasGc* CreateCanvasGcL();
- /**
- * Used to set flags that describe how the openvg state has changed.
- */
- virtual void AddRestoreStateFlags(TInt aFlags);
+ /**
+ * Used to set flags that describe how the openvg state has changed.
+ */
+ virtual void AddRestoreStateFlags(TInt aFlags);
- /**
- * Return the flags, e.g. for vg10gc to reset its state
- */
- virtual TInt GetRestoreStateFlags();
+ /**
+ * Return the flags, e.g. for vg10gc to reset its state
+ */
+ virtual TInt GetRestoreStateFlags();
- /**
- * Clear the stateflags
- */
- virtual void ClearRestoreStateFlags();
+ /**
+ * Clear the stateflags
+ */
+ virtual void ClearRestoreStateFlags();
#ifdef __NVG
- /**
- * Getter for NVGEngine, to be used with NVG drawing inside OpenVG plugin
- *
- * @return CNvgEngine object
- */
- CNvgEngine& NvgEngine() const;
+ /**
+ * Getter for NVGEngine, to be used with NVG drawing inside OpenVG plugin
+ *
+ * @return CNvgEngine object
+ */
+ CNvgEngine& NvgEngine() const;
#endif
+ /**
+ * Getter for hardware configuration flags (rendering quality Accurate / Fast)
+ */
+ TInt GetHwConfigurationFlags() const;
+
/**
* Getter for texture upload context. This is called by CHuiVg10Texture.
*/
@@ -366,6 +371,9 @@
MVGImageBinder* iMVGImageBinder;
#endif
+ // Hardware configuration, fetched from CenRep
+ TInt iHwConf;
+
TBool iAllowsSwapBufferPreserved;
TBool iAllowsVisualPBufferSurfaces;
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiVg10VgImageBinder.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/HuiVg10VgImageBinder.h Tue Apr 27 17:34:42 2010 +0300
@@ -88,7 +88,14 @@
EGLContext iContext;
EGLContext iSavedContext;
+
+ // Array for maintaining vgImages
+ RArray<VGImage> iGroupOpacityImages;
+ // Array for maintaining vgImages
+ RArray<EGLSurface> iGroupOpacitySurfaces;
+
};
+
#endif /* HUIVG10VGIMAGEBINDER_H_ */
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/huivg10canvasrenderbuffer.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/inc/huivg10canvasrenderbuffer.h Tue Apr 27 17:34:42 2010 +0300
@@ -78,6 +78,11 @@
*/
void Copy(TPoint aPoint);
+ /**
+ * Initializes render buffer, with clear option.
+ */
+ void InitializeL(const TSize& aSize, TBool aForceClear);
+
public:
VGImage Image() const;
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiFxVg10OffscreenRenderbuffer.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiFxVg10OffscreenRenderbuffer.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -69,7 +69,6 @@
// Create a context
iContext = eglCreateContext(iPlugin->EglDisplay(), config,
iPlugin->EglSharedContext(), NULL);
- EGLint err = eglGetError();
ASSERT(iContext);
// Create a pbuffer surface
@@ -190,42 +189,73 @@
{
if (iBackgroundEnabled)
{
- CHuiDisplay& display = CHuiStatic::Env().PrimaryDisplay();
- TBool rotatedDisplay = display.Orientation() == CHuiGc::EOrientationCCW90 || display.Orientation() == CHuiGc::EOrientationCW90;
- TRect renderBufferLocation = TRect(iPosition, iSize);
+ TBool rotatedDisplay = EFalse;
+ CHuiGc::TOrientation orientation = CHuiStatic::Env().PrimaryDisplay().Orientation();
+
+ // The current context can be the screen context or, in case of nested effects, an "effect off-screen"
+ // context. The latter uses VG image that is encapsulated inside PBuffer surface.
+ // Only if we have the screen context, the surface content can be in rotated state.
+
+ TBool isScreenContext = (iPlugin->EglSharedContext() == eglGetCurrentContext());
+ if (isScreenContext)
+ {
+ rotatedDisplay = orientation == CHuiGc::EOrientationCCW90 || orientation == CHuiGc::EOrientationCW90;
+ }
-#ifdef HUIFX_TRACE
- RDebug::Print(_L("CHuiFxVg10OffscreenRenderbuffer::PrepareForReuse - renderBufferLocation original: %i,%i, %i,%i "),
- renderBufferLocation.iTl.iX,
- renderBufferLocation.iTl.iY,
- renderBufferLocation.iBr.iX,
- renderBufferLocation.iBr.iY);
-#endif
-
- TRect displayArea = display.VisibleArea();
-
- TInt displayHeight = displayArea.Height();
- TInt displayWidth = displayArea.Width();
-
- TSize rotatedSize = iSize;
- TPoint rotatedPos = iPosition;
+
+ // Read surface size from egl
+ EGLDisplay eglDisp = eglGetCurrentDisplay();
+ EGLSurface eglSurf = eglGetCurrentSurface(EGL_DRAW);
+ EGLint sfWidth;
+ EGLint sfHeight;
+ eglQuerySurface(eglDisp, eglSurf, EGL_WIDTH, &sfWidth);
+ eglQuerySurface(eglDisp, eglSurf, EGL_HEIGHT, &sfHeight);
+
+ #ifdef HUIFX_TRACE
+ RDebug::Print(_L("CHuiFxVg10OffscreenRenderbuffer::ReadBackground - surface size: %i,%i "), sfWidth, sfHeight);
+ #endif
// Read pixels from surface
- if (rotatedDisplay)
+ if (!rotatedDisplay)
+ {
+ // Much easier if no rotation !
+ vgGetPixels(iImage, 0, 0, iPosition.iX, sfHeight - (iPosition.iY + iSize.iHeight), iSize.iWidth, iSize.iHeight);
+ }
+ else
{
- if (iRotatedImage == VG_INVALID_HANDLE)
+ // If screen is rotated but surface is not in native orientation, this gets difficult
+ // because vgGetPixels is not affected by transformations.
+
+ // display size = surface size rotated
+ TInt displayHeight = sfWidth;
+ TInt displayWidth = sfHeight;
+
+ TSize newRotatedImageSize = TSize(iSize.iHeight, iSize.iWidth);
+ if (iRotatedImage == VG_INVALID_HANDLE || iRotatedImageSize != newRotatedImageSize)
{
PushEGLContext();
+ // *** Create new vg image
+
+ // Remove existing vg image, if any
+ if (iRotatedImage != VG_INVALID_HANDLE)
+ {
+ vgDestroyImage(iRotatedImage);
+ iRotatedImage = VG_INVALID_HANDLE;
+ HUIFX_VG_INVARIANT();
+ }
+
#ifndef __WINS__ // Should possibly query the supported mode instead?
VGImageFormat imageInternalFormat = VG_sARGB_8888_PRE;
#else
VGImageFormat imageInternalFormat = VG_sARGB_8888;
#endif
- TSize rotatedImageSize = TSize(iSize.iHeight, iSize.iWidth);
- iRotatedImage = vgCreateImage(imageInternalFormat, rotatedImageSize.iWidth, rotatedImageSize.iHeight,
- VG_IMAGE_QUALITY_NONANTIALIASED);
+ iRotatedImageSize = newRotatedImageSize;
+ iRotatedImage = vgCreateImage(imageInternalFormat, iRotatedImageSize.iWidth, iRotatedImageSize.iHeight,
+ VG_IMAGE_QUALITY_NONANTIALIASED);
+ //iRotatedImage = vgCreateImage(imageInternalFormat, iSize.iWidth, iSize.iHeight,
+ // VG_IMAGE_QUALITY_NONANTIALIASED);
PopEGLContext();
}
@@ -233,14 +263,17 @@
// If we have rotation on CHuiGc level, we must manually take that into account when
// accessing pixels directly
- if(display.Orientation() == CHuiGc::EOrientationCCW90)
+ TSize rotatedSize = iSize;
+ TPoint rotatedPos = iPosition;
+ TRect renderBufferLocation = TRect(iPosition, iSize);
+ if(orientation == CHuiGc::EOrientationCCW90)
{
// Rotate the buffer location relative to real surface coordinates
rotatedSize = TSize(iSize.iHeight, iSize.iWidth);
rotatedPos = TPoint(displayHeight - iPosition.iY - iSize.iHeight, iPosition.iX);
renderBufferLocation = TRect(rotatedPos, rotatedSize);
}
- else if(display.Orientation() == CHuiGc::EOrientationCW90)
+ else if(orientation == CHuiGc::EOrientationCW90)
{
// Rotate the buffer location relative to real surface coordinates
rotatedSize = TSize(iSize.iHeight, iSize.iWidth);
@@ -251,23 +284,17 @@
{
// nothing
}
-
- // If screen is rotated but surface is not in native orientation, this gets difficult
- // because vgGetPixels is not affected by transformations.
-
- // Swap h and w so that those are the "real" values from surface point of view.
- displayHeight = displayWidth;
-
- #ifdef HUIFX_TRACE
- RDebug::Print(_L("CHuiFxVg10OffscreenRenderbuffer::PrepareForReuse - renderBufferLocation: %i,%i, %i,%i "),
+
+ #ifdef HUIFX_TRACE
+ RDebug::Print(_L("CHuiFxVg10OffscreenRenderbuffer::ReadBackground - renderBufferLocation: %i,%i, %i,%i "),
renderBufferLocation.iTl.iX,
renderBufferLocation.iTl.iY,
renderBufferLocation.iBr.iX,
renderBufferLocation.iBr.iY);
- TRect vgRect(TPoint(renderBufferLocation.iTl.iX, displayHeight - renderBufferLocation.iTl.iY - rotatedSize.iHeight), rotatedSize);
+ TRect vgRect(TPoint(renderBufferLocation.iTl.iX, sfHeight - renderBufferLocation.iTl.iY - rotatedSize.iHeight), rotatedSize);
- RDebug::Print(_L("CHuiFxVg10OffscreenRenderbuffer::PrepareForReuse - vgRect: %i,%i, %i,%i "),
+ RDebug::Print(_L("CHuiFxVg10OffscreenRenderbuffer::ReadBackground - vgRect: %i,%i, %i,%i "),
vgRect.iTl.iX,
vgRect.iTl.iY,
vgRect.iBr.iX,
@@ -275,7 +302,7 @@
#endif
// So...first get pixels from surface into rotated image
- vgGetPixels(iRotatedImage, 0, 0, renderBufferLocation.iTl.iX, displayHeight - renderBufferLocation.iTl.iY - rotatedSize.iHeight, rotatedSize.iWidth, rotatedSize.iHeight);
+ vgGetPixels(iRotatedImage, 0, 0, renderBufferLocation.iTl.iX, sfHeight - (renderBufferLocation.iTl.iY + rotatedSize.iHeight), rotatedSize.iWidth, rotatedSize.iHeight);
// Draw rotated image into real buffer image, first bind it as render target...
BindAsRenderTarget();
@@ -295,19 +322,19 @@
TInt h = iSize.iHeight;
// ...select right rotation...
- if (display.Orientation() == CHuiGc::EOrientationCW90)
+ if (orientation == CHuiGc::EOrientationCW90)
{
// Rotate around origo and move back to displayarea
vgRotate(-90);
vgTranslate(-h, 0);
}
- else if (display.Orientation() == CHuiGc::EOrientationCCW90)
+ else if (orientation == CHuiGc::EOrientationCCW90)
{
// Rotate around origo and move back to displayarea
vgRotate(90);
vgTranslate(0, -w);
}
- else if (display.Orientation() == CHuiGc::EOrientation180)
+ else if (orientation == CHuiGc::EOrientation180)
{
// Rotate around origo and move back to displayarea
vgRotate(180);
@@ -331,11 +358,6 @@
// ...finally unbind image and we should have the content correctly.
UnbindAsRenderTarget();
}
- else
- {
- // Much easier if no rotation !
- vgGetPixels(iImage, 0, 0, renderBufferLocation.iTl.iX, displayHeight - renderBufferLocation.iTl.iY - rotatedSize.iHeight, rotatedSize.iWidth, rotatedSize.iHeight);
- }
}
}
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiFxVg10OnscreenRenderbuffer.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiFxVg10OnscreenRenderbuffer.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -36,33 +36,12 @@
iPlugin = &aPlugin;
iSurface = &aSurface;
iTextureUsage = ERenderbufferUsageReadWrite;
-
-#ifndef __WINS__ // Should possibly query the supported mode instead?
- VGImageFormat imageInternalFormat = VG_sARGB_8888_PRE;
-#else
- VGImageFormat imageInternalFormat = VG_sARGB_8888;
-#endif
-
- iImage = vgCreateImage(imageInternalFormat, Size().iWidth, Size().iHeight, VG_IMAGE_QUALITY_NONANTIALIASED);
- HUIFX_VG_INVARIANT();
-
- // Initialize the context
- iGc = iPlugin->CreateGcL();
- BindAsRenderTarget();
- iGc->InitState();
- UnbindAsRenderTarget();
-
- // Let renderer know that we have been fiddlling with OpenVg state directly
- // "iGc->InitState" confuses scissoring setting, so lets notify it.
- CHuiVg10RenderPlugin& renderer = CHuiStatic::Vg10Renderer();
- renderer.AddRestoreStateFlags(EHuiVg10GcStateFlagDirtyScissor);
- renderer.AddRestoreStateFlags(EHuiVg10GcStateFlagDirtyBlendMode);
}
+
CHuiFxVg10OnscreenRenderbuffer::~CHuiFxVg10OnscreenRenderbuffer()
{
- vgDestroyImage(iImage);
- HUIFX_VG_INVARIANT();
+ ReleaseVgImage();
delete iGc;
}
@@ -87,6 +66,7 @@
iTextureUsage = aUsage;
if (aUsage == ERenderbufferUsageReadWrite || aUsage == ERenderbufferUsageReadOnly)
{
+ CreateVgImage();
BindAsRenderTarget();
vgGetPixels(iImage, 0, 0, 0, 0, Size().iWidth, Size().iHeight);
HUIFX_VG_INVARIANT();
@@ -103,6 +83,7 @@
vgSetPixels(0, 0, iImage, 0, 0, Size().iWidth, Size().iHeight);
HUIFX_VG_INVARIANT();
UnbindAsRenderTarget();
+ ReleaseVgImage();
}
}
@@ -123,3 +104,34 @@
// this should never happen.
ASSERT(FALSE);
}
+
+void CHuiFxVg10OnscreenRenderbuffer::CreateVgImage()
+ {
+#ifndef __WINS__ // Should possibly query the supported mode instead?
+ VGImageFormat imageInternalFormat = VG_sARGB_8888_PRE;
+#else
+ VGImageFormat imageInternalFormat = VG_sARGB_8888;
+#endif
+
+ iImage = vgCreateImage(imageInternalFormat, Size().iWidth, Size().iHeight, VG_IMAGE_QUALITY_NONANTIALIASED);
+ HUIFX_VG_INVARIANT();
+
+ // Initialize the context
+ iGc = iPlugin->CreateGcL();
+ BindAsRenderTarget();
+ iGc->InitState();
+ UnbindAsRenderTarget();
+
+ // Let renderer know that we have been fiddlling with OpenVg state directly
+ // "iGc->InitState" confuses scissoring setting, so lets notify it.
+ CHuiVg10RenderPlugin& renderer = CHuiStatic::Vg10Renderer();
+ renderer.AddRestoreStateFlags(EHuiVg10GcStateFlagDirtyScissor);
+ renderer.AddRestoreStateFlags(EHuiVg10GcStateFlagDirtyBlendMode);
+ }
+
+void CHuiFxVg10OnscreenRenderbuffer::ReleaseVgImage()
+ {
+ vgDestroyImage(iImage);
+ HUIFX_VG_INVARIANT();
+ }
+
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Gc.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Gc.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -32,7 +32,6 @@
#include "uiacceltk/HuiPanic.h"
#include "uiacceltk/huifixmath.h"
#include "HuiRenderSurface.h"
-#include "../../CommonInc/uiacceltkdomaincrkeys.h"
#include "huiextension.h"
@@ -385,8 +384,9 @@
vgRemovePathCapabilities(iBorderPath, VG_PATH_CAPABILITY_APPEND_TO);
// Get hardware configuration
- TInt hwConf = 0; // the defaulf value for everything is 0 to allow new flags to be defined
- HuiUtil::GetValueFromCentralRepository( KUIAccelTKHWConfigurationFlags, hwConf );
+ CHuiVg10RenderPlugin& renderer = (CHuiVg10RenderPlugin&) CHuiStatic::Renderer();
+ TInt hwConf = renderer.GetHwConfigurationFlags();
+
if ( hwConf & KHuiAntialiasing )
{
SetQuality( EHuiQualityAccurate );
@@ -395,11 +395,10 @@
{
SetQuality( EHuiQualityFast );
}
-
iVgObjectsCreated = ETrue;
}
-
+
void CHuiVg10Gc::InitState()
{
// Clean matrix stack in case there is anything left
@@ -2225,15 +2224,6 @@
HUI_DEBUG(_L("CHuiVg10Gc::DrawNVG() - Fallback to draw the old way (via DrawNvg)"));
iNvgEngine->DrawNvg(nvgDataVoidIC, aImageSize, NULL, NULL);
}
-
-#ifdef _DEBUG
- // TODO: REMOVE ONCE THE TSW ERROR IS FIXED!
- VGErrorCode err = vgGetError();
- if (err)
- {
- RDebug::Print(_L("CHuiVg10Gc::DrawNVG - Error in NVG draw: %04x"), err);
- }
-#endif
// The NVG draw messes up the paint, scissoring & rects, so mark them as dirty
TInt dirtyFlags = EHuiVg10GcStateFlagDirtyPaint |
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10RenderPlugin.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10RenderPlugin.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -32,6 +32,7 @@
#include "uiacceltk/HuiEnv.h"
#include "uiacceltk/HuiDisplay.h"
#include "HuiFxVg10Engine.h"
+#include "../../CommonInc/uiacceltkdomaincrkeys.h"
#ifdef __NVG
#include <nvg.h>
@@ -109,7 +110,10 @@
// Initialize some "allow flags" which depend on used HW
ReadAllowsSwapBufferPreserved();
- ReadAllowsVisualPBufferSurfaces();
+ ReadAllowsVisualPBufferSurfaces();
+
+ // Cache the Hardware configuration
+ iHwConf = HuiUtil::GetValueFromCentralRepository( KUIAccelTKHWConfigurationFlags, iHwConf );
}
CHuiVg10RenderPlugin::~CHuiVg10RenderPlugin()
@@ -508,6 +512,11 @@
}
#endif
+TInt CHuiVg10RenderPlugin::GetHwConfigurationFlags() const
+ {
+ return iHwConf;
+ }
+
// TODO: This is only a temporary check until all HW platforms support feature
void CHuiVg10RenderPlugin::ReadAllowsSwapBufferPreserved()
{
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Texture.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Texture.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -1379,16 +1379,6 @@
EHuiVg10GcStateFlagDirtyScissorRects;
iRenderPlugin.AddRestoreStateFlags(dirtyFlags);
-#ifdef _DEBUG
- // TODO: There's something in the DrawNvg() code, which causes OpenVg to set
- // error code => PANIC, if not for this temp check here. REMOVE ONCE THE TSW ERROR IS FIXED!
- VGErrorCode err = vgGetError();
- if (err)
- {
- RDebug::Print(_L("CHuiVG10Texture::CreateRenderedImage - Error in NVG draw: %04x"), err);
- }
-#endif
-
HUI_VG_INVARIANT();
vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10VGImageBinder.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10VGImageBinder.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -1,28 +1,28 @@
/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Class HuiVg10VGImageBinder
-*
-*/
+ * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Class HuiVg10VGImageBinder
+ *
+ */
#include "HuiVg10VgImageBinder.h"
#include "HuiVg10RenderPlugin.h"
#include "uiacceltk/HuiUtil.h"
CHuiVg10VgImageBinder::CHuiVg10VgImageBinder(CHuiVg10RenderPlugin* aRenderPlugin):
- iRenderPlugin(aRenderPlugin)
- {
- }
+iRenderPlugin(aRenderPlugin)
+ {
+ }
void CHuiVg10VgImageBinder::ConstructL()
{
@@ -48,79 +48,127 @@
TInt CHuiVg10VgImageBinder::BindClientBuffer(TUint aBuffer)
{
- // Check whether we should use the Alpha format bit
- VGImageFormat imageFormat = (VGImageFormat)vgGetParameteri(aBuffer, VG_IMAGE_FORMAT);
- TInt maskBit = 0;
- if (imageFormat == VG_sRGBA_8888_PRE)
+
+ // This returns the index of the corresponding aBuffer stored in the array.
+ // If KErrNotFound is returned,it indicates that this is the first BindClientBuffer
+ // call for aBuffer and hence eglPbufferfromclient has to be created for this buffer
+ TInt bufferIndex = iGroupOpacityImages.Find(aBuffer);
+
+
+ // This check mandates that iSavedDraw/Read Surfaces are stored only for the first time
+ // (i.e., before any pbufferfromclient surfaces are created).This is because when there are concurrent
+ // BindToImageL calls,we would eventually be losing track of the base window surface on
+ // top of which the vgImage has to be drawn.
+ if(iGroupOpacityImages.Count() == 0)
{
- maskBit = EGL_VG_ALPHA_FORMAT_PRE_BIT;
+ // Save current context and surfaces
+ iSavedContext = eglGetCurrentContext();
+ iSavedDrawSurface = eglGetCurrentSurface(EGL_DRAW);
+ iSavedReadSurface = eglGetCurrentSurface(EGL_READ);
}
-
- const TInt BITS_PER_CHANNEL = 8;
- // Choose an EGL config
- const EGLint attrs[] =
+
+ // Buffer Index would be KErrNotFound if this is the first BindClientBuffer call for aBuffer
+ // (there would be multiple BindClientBuffer calls for an aBuffer) and hence corresponding
+ // pbufferfromclient surface has to be created for that aBuffer.
+ if(bufferIndex == KErrNotFound)
{
- EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT,
- EGL_SURFACE_TYPE, EGL_PBUFFER_BIT | maskBit,
- EGL_RED_SIZE, BITS_PER_CHANNEL,
- EGL_GREEN_SIZE, BITS_PER_CHANNEL,
- EGL_BLUE_SIZE, BITS_PER_CHANNEL,
- EGL_ALPHA_SIZE, BITS_PER_CHANNEL,
- EGL_NONE
- };
+ // Check whether we should use the Alpha format bit
+ VGImageFormat imageFormat = (VGImageFormat)vgGetParameteri(aBuffer, VG_IMAGE_FORMAT);
+ TInt maskBit = 0;
+ if (imageFormat == VG_sRGBA_8888_PRE)
+ {
+ maskBit = EGL_VG_ALPHA_FORMAT_PRE_BIT;
+ }
+
+ const TInt BITS_PER_CHANNEL = 8;
+ // Choose an EGL config
+ const EGLint attrs[] =
+ {
+ EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT,
+ EGL_SURFACE_TYPE, EGL_PBUFFER_BIT | maskBit,
+ EGL_RED_SIZE, BITS_PER_CHANNEL,
+ EGL_GREEN_SIZE, BITS_PER_CHANNEL,
+ EGL_BLUE_SIZE, BITS_PER_CHANNEL,
+ EGL_ALPHA_SIZE, BITS_PER_CHANNEL,
+ EGL_NONE
+ };
+
+ // Create a context
+ TInt configCount = iRenderPlugin->EglChooseConfig(attrs);
+ EGLConfig config = iRenderPlugin->EglConfig(0);
+
+ // Create a pbuffer surface
+ iEglPBufferSurface_Client = eglCreatePbufferFromClientBuffer(iRenderPlugin->EglDisplay(),
+ EGL_OPENVG_IMAGE,
+ static_cast<EGLClientBuffer>(aBuffer), // Use the param image as buffer
+ config, NULL);
+ if (iEglPBufferSurface_Client == EGL_NO_SURFACE)
+ {
+ HUI_DEBUG1(_L("CHuiVg10VgImageBinder::BindClientBuffer() - EGL Surface could not be created, eglErr: %04x"), eglGetError() );
+ return KErrGeneral;
+ }
+ iGroupOpacitySurfaces.Append(iEglPBufferSurface_Client);
+ iGroupOpacityImages.Append(aBuffer);
+ }
+ // Control would go to else part indicating that this is not the first BindClientBuffer for aBuffer
+ // and hence the corresponding eglPBufferfromClient surface could be retrieved with the bufferIndex
+ else
+ {
+ iEglPBufferSurface_Client = iGroupOpacitySurfaces[bufferIndex];
+ }
+
+ EGLContext context = iRenderPlugin->EglSharedContext();
- // Create a context
- TInt configCount = iRenderPlugin->EglChooseConfig(attrs);
- EGLConfig config = iRenderPlugin->EglConfig(0);
+ // eglMakeCurrent with EGL_NO_SURFACE de-couples vgImage from an old eglpbufferfromclient surface.
+ // Otherwise in a multiple BindClientBuffer scenario for the same vgImage, eglMakeCurrent
+ // fails with an EGL_BAD_ACCESS error (vgimage already inuse error)
+ eglMakeCurrent(iRenderPlugin->EglDisplay(), EGL_NO_SURFACE, EGL_NO_SURFACE, context);
- // Create a pbuffer surface
- iEglPBufferSurface_Client = eglCreatePbufferFromClientBuffer(iRenderPlugin->EglDisplay(),
- EGL_OPENVG_IMAGE,
- static_cast<EGLClientBuffer>(aBuffer), // Use the param image as buffer
- config, NULL);
-
- if (iEglPBufferSurface_Client == EGL_NO_SURFACE)
+ // Bind our own PBuffer surface (from VGImage)
+ if ( eglMakeCurrent(iRenderPlugin->EglDisplay(), iEglPBufferSurface_Client, iEglPBufferSurface_Client, context ) == EGL_FALSE )
{
- HUI_DEBUG1(_L("CHuiVg10VgImageBinder::BindClientBuffer() - EGL Surface could not be created, eglErr: %04x"), eglGetError() );
+ HUI_DEBUG1(_L("CHuiVg10VgImageBinder::BindClientBuffer() - EGL Surface could not be made current, eglErr: %04x"), eglGetError());
+ TInt eglError = eglGetError();
return KErrGeneral;
}
- // Save current context and surfaces
- iSavedContext = eglGetCurrentContext();
- iSavedDrawSurface = eglGetCurrentSurface(EGL_DRAW);
- iSavedReadSurface = eglGetCurrentSurface(EGL_READ);
-
- EGLContext context = iRenderPlugin->EglSharedContext();
-
- // Bind our own PBuffer surface (from VGImage)
- if ( eglMakeCurrent(iRenderPlugin->EglDisplay(), iEglPBufferSurface_Client, iEglPBufferSurface_Client, context /*iSavedContext*/) == EGL_FALSE )
- {
- HUI_DEBUG1(_L("CHuiVg10VgImageBinder::BindClientBuffer() - EGL Surface could not be made current, eglErr: %04x"), eglGetError());
- return KErrGeneral;
- }
-
// Alles in Ordnung!
return KErrNone;
}
TInt CHuiVg10VgImageBinder::UnBindClientBuffer()
{
- if ( eglMakeCurrent(iRenderPlugin->EglDisplay(), iSavedDrawSurface, iSavedReadSurface, iSavedContext) == EGL_FALSE )
+ EGLContext context = iRenderPlugin->EglSharedContext();
+
+ // eglMakeCurrent with EGL_NO_SURFACE de-couples vgImage from an old eglpbufferfromclient surface.
+ // Otherwise in a multiple BindClientBuffer scenario for the same vgImage, eglMakeCurrent
+ // fails with an EGL_BAD_ACCESS error (vgimage already inuse error)
+ eglMakeCurrent(iRenderPlugin->EglDisplay(), EGL_NO_SURFACE, EGL_NO_SURFACE, context);
+
+ // iSavedDrawSurface and iSavedReadSurface would be the window surface on top of which the
+ // group opacity vgImages(aBuffers) would have to be drawn. This is the reason why we store
+ // iSavedDrawSurface only once at the start of BindClientBuffer routine.
+ if ( eglMakeCurrent(iRenderPlugin->EglDisplay(), iSavedDrawSurface, iSavedReadSurface, context) == EGL_FALSE )
{
HUI_DEBUG1(_L("CHuiVg10VgImageBinder::BindClientBuffer() - EGL Surface could not be made current, eglErr: %04x"), eglGetError());
return KErrGeneral;
}
-
- iSavedDrawSurface = 0;
- iSavedReadSurface = 0;
- iSavedContext = 0;
+
+ // When the final UnBindClientBuffer is called and the vgimage has to be drawn on to the window surface.
+ // We would lose the handles if these iSaved surfaces are set to zero.
+// iSavedDrawSurface = 0;
+// iSavedReadSurface = 0;
+// iSavedContext = 0;
if (iEglPBufferSurface_Client)
{
+ TInt bufferIndex = iGroupOpacitySurfaces.Find(iEglPBufferSurface_Client);
+ iGroupOpacitySurfaces.Remove(bufferIndex);
+ iGroupOpacityImages.Remove(bufferIndex);
eglDestroySurface( iRenderPlugin->EglDisplay(), iEglPBufferSurface_Client );
iEglPBufferSurface_Client = EGL_NO_SURFACE;
}
-
+
// Everything went fine
return KErrNone;
}
--- a/uiacceltk/hitchcock/coretoolkit/rendervg10/src/huivg10canvasrenderbuffer.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/src/huivg10canvasrenderbuffer.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -450,3 +450,39 @@
}
}
+void CHuiVg10CanvasRenderBuffer::InitializeL(const TSize& aSize, TBool aForceClear)
+ {
+ if (!IsInitialized())
+ {
+ InitializeL(aSize);
+ }
+ else
+ {
+ if (aForceClear)
+ {
+ CHuiVg10RenderPlugin& renderer = CHuiStatic::Vg10Renderer();
+
+ // Reinitialize the context
+ PushEGLContext();
+
+ Bind();
+ iGc->InitState();
+
+ VGfloat color[] =
+ {
+ 0.f, 0.f, 0.f, 0.f
+ };
+ vgSetfv(VG_CLEAR_COLOR, sizeof(color) / sizeof(VGfloat), color);
+ vgClear(0, 0, iSize.iWidth, iSize.iHeight);
+ UnBind();
+
+ // Let renderer know that we have been fiddlling with OpenVg state directly
+ // "iGc->InitState" confuses scissoring setting, so lets notify it.
+ renderer.AddRestoreStateFlags(EHuiVg10GcStateFlagDirtyScissor);
+ renderer.AddRestoreStateFlags(EHuiVg10GcStateFlagDirtyBlendMode);
+
+ PopEGLContext();
+ }
+ }
+ }
+
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiCanvasTextureCache.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiCanvasTextureCache.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -3270,7 +3270,7 @@
if (cachedEntry == KErrNotFound)
{
// Try first getting reused render buffer
- newRenderBufferEntry = ReUseReleasedRenderBuffer(aSizeHint);
+ newRenderBufferEntry = ReUseReleasedRenderBufferL(aSizeHint);
// Create new entry object if needed
if (!newRenderBufferEntry)
@@ -3375,7 +3375,7 @@
//
// ---------------------------------------------------------------------------
//
-CHuiCanvasRenderBufferImage* CHuiCanvasTextureCache::ReUseReleasedRenderBuffer(TSize aSizeHint)
+CHuiCanvasRenderBufferImage* CHuiCanvasTextureCache::ReUseReleasedRenderBufferL(TSize aSizeHint)
{
if (aSizeHint == TSize(0,0))
{
@@ -3392,6 +3392,12 @@
// Remove from array and return instance to caller
CHuiCanvasRenderBufferImage* reusedEntry = iCachedRenderBuffers[i];
iCachedRenderBuffers.Remove(i);
+
+ if (reusedEntry->iCanvasRenderBuffer && reusedEntry->iCanvasRenderBuffer->IsInitialized())
+ {
+ reusedEntry->iCanvasRenderBuffer->InitializeL(aSizeHint, ETrue);
+ }
+
return reusedEntry;
}
}
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiDisplay.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiDisplay.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -706,7 +706,7 @@
RosterImpl().ScanDirty();
}
- if (!useDirtyRects || cantUseDirtyRectsInThisFrame || iEnv.EffectsEngine()->HasActiveEffects())
+ if (!useDirtyRects || cantUseDirtyRectsInThisFrame || iEnv.EffectsEngine()->HasActiveEffects() || RosterImpl().IsVisibleContentFrozen())
{
// Just redraw everything
iCurrentDirtyRegions->Reset();
@@ -759,7 +759,9 @@
// 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())
+ if (iEnv.EffectsEngine()->HasActiveEffects()
+ || RosterImpl().IsVisibleContentFrozen() // guaranteen, that transparent pixels of the UI surface are drawn correctly during layout switch.
+ )
{
iGc->SetPenColor(KRgbBlack);
iGc->SetPenAlpha(0);
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffect.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffect.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -81,12 +81,12 @@
ReleaseCachedRenderTarget();
iEngine->RemoveEffect(this);
- if (iEngine && iGroupId != KErrNotFound && !iNotifiedEffectReady)
+ if (iEngine && iGroupId != KErrNotFound && !(iFlags & KHuiReadyToDrawNotified))
{
// 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;
+ // effect group does not not know, which effects have notified about themselves.
+ SetEffectFlag(KHuiReadyToDrawNotified);
iEngine->NotifyEffectReady(iGroupId);
}
@@ -95,12 +95,17 @@
#endif
}
-void CHuiFxEffect::NotifyEffectEndObserver()
+TBool CHuiFxEffect::NotifyEffectEndObserver()
{
+ if (iFlags & KHuiEffectObserverNotified)
+ {
+ return ETrue;
+ }
+ SetEffectFlag(KHuiEffectObserverNotified); // prevent extra notifier calls calls
// fade effect should not have observers
if (iFlags & KHuiFadeEffectFlag)
{
- return;
+ return ETrue; // fade effect does not have observer that would need notification
}
if (iEffectEndObserver)
{
@@ -109,7 +114,14 @@
iEffectEndObserver = NULL;
// Note: The call below may synchronously delete me (CHuiFxEffect instance)
effectEndObserver->AlfGfxEffectEndCallBack( iHandle );
- }
+ return ETrue; // end observer notified
+ }
+ else
+ {
+ // must be notified without destroying the effect first. gives alf apps chance
+ // to do their own cleanup
+ return EFalse;
+ }
}
EXPORT_C void CHuiFxEffect::AddLayerL(const CHuiFxLayer* aLayer)
@@ -507,7 +519,6 @@
#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
@@ -536,7 +547,7 @@
// NotifyEffectReady will clear KHuiFxReadyAndWaitingGroupToStartSyncronized flag
// if all items in the group are ready.
iEngine->NotifyEffectReady(iGroupId);
- iNotifiedEffectReady = ETrue;
+ SetEffectFlag(KHuiReadyToDrawNotified);
return;
}
@@ -552,6 +563,7 @@
{
iRoot->AdvanceTime(aElapsedTime);
}
+ iElapsedTime += aElapsedTime;
}
EXPORT_C TBool CHuiFxEffect::IsAnimated() const
@@ -631,3 +643,8 @@
{
iRoot->FxmlVisualInputs(aArray);
}
+
+TBool CHuiFxEffect::FxmlUsesOpaqueHint() const
+ {
+ return iRoot->FxmlUsesOpaqueHint();
+ }
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffectCache.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffectCache.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -234,7 +234,7 @@
}
return 0;
}
-MHuiFxEffectCacheNode *CHuiFxEffectCache::FindCached(const TDesC &aId)
+MHuiFxEffectCacheNode *CHuiFxEffectCache::FindCached(const TDesC &aId) const
{
TInt size2 = iCachedEffects.Count();
for(TInt i=0;i<size2;i++)
@@ -257,6 +257,16 @@
return EFalse;
}
+TBool CHuiFxEffectCache::FxmlUsesOpaqueHint(const TDesC &aFileName) const
+ {
+ MHuiFxEffectCacheNode *node = FindCached(aFileName);
+ if (node)
+ return node->FxmlUsesOpaqueHint();
+ else
+ return EFalse;
+ }
+
+
void CHuiFxEffectCache::Remove(RHashMap<TInt, MHuiFxEffectCacheNode*> & /*aMap*/, MHuiFxEffectCacheNode * /*aNode*/)
{
@@ -431,3 +441,9 @@
array.Close();
return EFalse;
}
+
+TBool CHuiFxEffectCacheEffectNode::FxmlUsesOpaqueHint() const
+ {
+ CHuiFxEffect *effect = iEffect;
+ return effect->FxmlUsesOpaqueHint();
+ }
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffectParser.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffectParser.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -345,9 +345,11 @@
#endif
TPtrC16 extBitmap;
THuiFxVisualSrcType srcType = GetSrcTypeL( aNode, extBitmap );
+ TBool opaqueHint = GetOpaqueHintL(aNode);
CHuiFxVisualLayer* visual = CHuiFxVisualLayer::NewL( iVisual );
CleanupStack::PushL( visual );
visual->SetSourceType( srcType );
+ visual->SetFxmlUsesOpaqueHint( opaqueHint );
if ( srcType == EVisualSrcBitmap && extBitmap.Length() > 0 )
{
visual->SetExtBitmapFileL( extBitmap );
@@ -1159,6 +1161,35 @@
#endif
return ref;
}
+TBool CHuiFxEffectParser::GetOpaqueHintL( CMDXMLNode *aNode )
+ {
+ if (aNode->NodeType() != CMDXMLNode::EElementNode)
+ {
+ FAIL(KErrGeneral, _L("Text node expected while reading visual source type"));
+ }
+ TInt attributeIndex = ((CMDXMLElement*)aNode)->FindIndex( KLitOpaque );
+ if (attributeIndex == KErrNotFound)
+ {
+ // If src not found, the source defaults to visual itself
+ return EFalse;
+ }
+
+ TPtrC attributeValue;
+ TPtrC attributeName;
+ User::LeaveIfError(((CMDXMLElement*)aNode)->AttributeDetails( attributeIndex, attributeName, attributeValue ));
+
+ if( attributeValue.Compare( KLitTrue ) == 0 )
+ {
+ return ETrue;
+ }
+
+ if( attributeValue.Compare( KLitFalse ) == 0 )
+ {
+ return EFalse;
+ }
+
+ return EFalse;
+ }
THuiFxVisualSrcType CHuiFxEffectParser::GetSrcTypeL( CMDXMLNode* aNode, TPtrC16& aBitmap )
{
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxEngine.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxEngine.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -77,6 +77,15 @@
return EFalse;
#endif
}
+EXPORT_C TBool CHuiFxEngine::FxmlUsesOpaqueHint(const TDesC &aFileName)
+ {
+#ifdef HUIFX_EFFECTCACHE_ENABLED
+ return iCache->FxmlUsesOpaqueHint(aFileName);
+#endif
+#ifndef HUIFX_EFFECTCACHE_ENABLED
+ return EFalse;
+#endif
+ }
TBool CHuiFxEngine::FxmlUsesInput1(CHuiFxEffect& aEffect)
{
@@ -287,7 +296,13 @@
#ifdef HUIFX_TRACE
RDebug::Printf("void CHuiFxEngine::NotifyEffectEndObservers() calling NotifyEffectEndObserver");
#endif
- effect->NotifyEffectEndObserver();
+ if (!effect->NotifyEffectEndObserver())
+ {
+ // this effect is not in effect cleanupstack and does not have end observer on coretoolkit
+ // side. However, it might have observer on alf side, that is notified from RemoveEffect.
+ // Alf clients are responsible for destroying their own effects
+ RemoveEffect(effect);
+ }
}
}
}
@@ -366,6 +381,8 @@
TInt i = iActiveEffects.Find(aEffect);
if (i >= 0)
{
+ // Note, will effecsts will be drawn until they are destroyed. Removing
+ // from iActiveEffects list only stops timeline updates.
iActiveEffects.Remove(i);
if (iEffectObserver)
{
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxGroupLayer.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxGroupLayer.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -456,6 +456,16 @@
}
}
+TBool CHuiFxGroupLayer::FxmlUsesOpaqueHint() const
+ {
+ TBool b = EFalse;
+ for( TInt i=0 ; i < iLayers.Count() ; i++ )
+ {
+ b |= iLayers[i]->FxmlUsesOpaqueHint();
+ }
+ return b;
+ }
+
void CHuiFxGroupLayer::SetAlwaysReadSurfacePixels(TBool aAlwaysReadSurfacePixels)
{
CHuiFxLayer::SetAlwaysReadSurfacePixels(aAlwaysReadSurfacePixels);
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxVisualLayer.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxVisualLayer.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -174,6 +174,7 @@
else
layer->iExtBitmapFile = NULL;
layer->iOpacity = iOpacity;
+ layer->iOpaqueHint = iOpaqueHint;
return layer;
}
EXPORT_C void CHuiFxVisualLayer::SetExtRect( TRect * /*aExtRect*/ )
@@ -446,7 +447,17 @@
{
aArray.Append(iSrcType);
}
-
+
+TBool CHuiFxVisualLayer::FxmlUsesOpaqueHint() const
+ {
+ return iOpaqueHint;
+ }
+
+void CHuiFxVisualLayer::SetFxmlUsesOpaqueHint(TBool aValue)
+ {
+ iOpaqueHint = aValue;
+ }
+
TBool CHuiFxVisualLayer::IsSemitransparent() const
{
if (iOpacity < 1.f)
--- a/uiacceltk/hitchcock/coretoolkit/src/huicanvasrenderbuffer.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/huicanvasrenderbuffer.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -69,4 +69,8 @@
// Default implementation does nothing
}
+EXPORT_C void CHuiCanvasRenderBuffer::InitializeL(const TSize& /*aSize*/, TBool /*aForceClear*/)
+ {
+ iInitialized = ETrue;
+ }
--- a/uiacceltk/hitchcock/goommonitor/data/goomconfig.xml Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/goommonitor/data/goomconfig.xml Tue Apr 27 17:34:42 2010 +0300
@@ -67,6 +67,8 @@
this line may be enabled for flashlite and other apps that allocate mem through policy server
close_app uid="101FD693" priority="80" sync_mode="check" close_timeout="3000" wait_after_close="5000"
-->
+ <close_app uid="AF00ABBA" priority="NEVER_CLOSE" sync_mode="check"></close_app> <!--QtLauncher-->
+
</app_close_settings>
<!-- The priority of executing each system plugin is defined here.
@@ -78,6 +80,7 @@
-->
<system_plugin uid="DEFAULT_PLUGIN" priority="10" sync_mode="check" sw_rend="not_supported"></system_plugin>
<system_plugin uid="E4B6C988" priority="3" sync_mode="check" sw_rend="supported"></system_plugin> <!-- ALFOOGMPLUGIN -->
+ <system_plugin uid="2002DC75" priority="4" sync_mode="check" sw_rend="supported"></system_plugin> <!-- HbThemeserverOOGMPLUGIN? -->
<system_plugin uid="2002C30A" priority="5" sync_mode="continue"></system_plugin> <!-- FLASHOOGMPLUGIN -->
</system_plugin_settings>
--- a/uiacceltk/hitchcock/goommonitor/inc/goomactionlist.h Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/goommonitor/inc/goomactionlist.h Tue Apr 27 17:34:42 2010 +0300
@@ -191,6 +191,12 @@
*/
void SetUseSwRendering(TBool aUseSwRendering);
+ /**
+ * Returns 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
+ */
+ TBool UseSwRendering();
+
// from MGOomActionObserver
/**
--- a/uiacceltk/hitchcock/goommonitor/inc/traceconfiguration.hrh Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/goommonitor/inc/traceconfiguration.hrh Tue Apr 27 17:34:42 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
--- a/uiacceltk/hitchcock/goommonitor/src/goomactionlist.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/goommonitor/src/goomactionlist.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -753,3 +753,8 @@
{
iUseSwRendering = aUseSwRendering;
}
+
+TBool CGOomActionList::UseSwRendering()
+ {
+ return iUseSwRendering;
+ }
--- a/uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/goommonitor/src/goommemorymonitor.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -282,9 +282,12 @@
iGOomActionList->MemoryGood();
}
*/
- iServer->CloseAppsFinished(freeMemory, ETrue);
- WaitAndSynchroniseMemoryState();
- return;
+ if(!iGOomActionList->UseSwRendering())
+ {
+ iServer->CloseAppsFinished(freeMemory, ETrue);
+ WaitAndSynchroniseMemoryState();
+ return;
+ }
}
// update wg list only when actually about to use it
@@ -478,7 +481,10 @@
iCurrentTarget = aTarget;
iGOomActionList->SetCurrentTarget(iCurrentTarget);
if(!aTarget)
+ {
iTrigger = EGOomTriggerNone; //reset the trigger condition
+ }
+ iGOomActionList->SetUseSwRendering(EFalse);
}
void CMemoryMonitor::SetPriorityBusy(TInt aWgId)
--- a/uiacceltk/hitchcock/plugins/alftranseffect/alftranseffectplugin/src/wsserverdrawercontroller.cpp Wed Apr 14 16:53:50 2010 +0300
+++ b/uiacceltk/hitchcock/plugins/alftranseffect/alftranseffectplugin/src/wsserverdrawercontroller.cpp Tue Apr 27 17:34:42 2010 +0300
@@ -62,10 +62,11 @@
0x101F8681, // VideoTelUi
0x101F875A, // KSWInstSvrUid, prevent fullscreen effect on installing
0x101F8543, // Voice Commands, no effects when pressing send key long
- 0x10281855 // touch input server , no effects when the first time start up
+ 0x10281855, // touch input server , no effects when the first time start up
// startup blocked because startup exit leaves the screen black.
// must be debugged
- , 0x100058F4 // startup blocked for the time being
+ 0x100058F4, // startup blocked for the time being
+ 0x101f857A // camera
// Application shell is Ok, folder open and close have KAknApplicationShellViewId
// as both to and from ids. There is only one visual, so some sort of blur effect works...
//, KAknApplicationShellViewId
@@ -82,6 +83,9 @@
const TUint KCustomNoEffectApps[] =
{
0x0, // DO NOT REMOVE 0x0! this is here for compile reasons, it will not be included in the AllowedCustomUid check
+ 0x101f857A, // camera
+ 0x2002A540 // conversation.exe , other launchable from messaging don't have effect either
+
//0xUID //Add UIds of applications that shouldn't have effects here
};