--- a/mdfdevvideoextensions/nga_mdf_postprocessor/inc/surface_hints.h Wed Aug 18 11:16:18 2010 +0300
+++ b/mdfdevvideoextensions/nga_mdf_postprocessor/inc/surface_hints.h Thu Sep 02 22:02:55 2010 +0300
@@ -48,6 +48,12 @@
*/
const TInt KSurfaceProtection = 0x3;
+/** Hint about the surface’s characteristics or properties,
+ For example if a surface can be persisted by the effects engine.
+ @see TSurfaceCharacteristics for possible values.
+*/
+const TInt KSurfaceCharacteristics = 0x4;
+
/** Values used for the KSurfaceContent key */
enum TSurfaceContent
@@ -121,6 +127,17 @@
};
+/** Values used for the KSurfaceCharacteristics key. The values are bitmasks and can be combined.
+*/
+enum TSurfaceCharacteristics
+ {
+ /**
+ * Surface cannot be persisted once it has been closed by the creator
+ */
+ ENotPersistable = 1,
+ };
+
+
class TSurfaceUpdate
{
/** Constructor.
@@ -186,7 +203,7 @@
return ( iValue & 0x80000000 ) ? ETrue : EFalse;
}
-}; //namespace surfaceHints
+} //namespace surfaceHints
#endif //__SURFACE_HINTS_LOCAL_H__
--- a/mdfdevvideoextensions/nga_mdf_postprocessor/src/NGAPostProcHwDevice.cpp Wed Aug 18 11:16:18 2010 +0300
+++ b/mdfdevvideoextensions/nga_mdf_postprocessor/src/NGAPostProcHwDevice.cpp Thu Sep 02 22:02:55 2010 +0300
@@ -2332,7 +2332,6 @@
err = iSurfaceHandler->AddSurfaceHint(iSurfaceId,iHint);
if(err == KErrAlreadyExists)
{
- err = KErrNone;
err = iSurfaceHandler->SetSurfaceHint(iSurfaceId,iHint);
}
PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:AddHints. err = %d --"), this,err);
@@ -2342,10 +2341,21 @@
err = iSurfaceHandler->AddSurfaceHint(iSurfaceId,iHint);
if(err == KErrAlreadyExists)
{
- err = KErrNone;
err = iSurfaceHandler->SetSurfaceHint(iSurfaceId,iHint);
}
PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:AddHints. err = %d --"), this,err);
+ if(iUsingExternalSurface)
+ {
+ iHint.iKey.iUid = surfaceHints::KSurfaceCharacteristics;
+ iHint.iValue = surfaceHints::ENotPersistable;
+ iHint.iMutable = ETrue;
+ err = iSurfaceHandler->AddSurfaceHint(iSurfaceId,iHint);
+ if(err == KErrAlreadyExists)
+ {
+ err = iSurfaceHandler->SetSurfaceHint(iSurfaceId,iHint);
+ }
+ PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:AddHints. err = %d --"), this,err);
+ }
return err;
}