uiacceltk/hitchcock/coretoolkit/src/HuiFxEffect.cpp
branchRCL_3
changeset 34 3a60ebea00d0
parent 24 f93c875b566e
child 49 c9d868f1e20c
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffect.cpp	Tue May 25 13:39:57 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiFxEffect.cpp	Wed Jun 09 10:41:25 2010 +0300
@@ -261,13 +261,13 @@
 TBool CHuiFxEffect::CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque)
     {
     RRegion dummy;
-    TBool ret = CachedDraw(aGc, aDisplayRect, aRefreshCachedRenderTarget, aOpaque, dummy);
+    TBool ret = CachedDraw(aGc, aDisplayRect, aRefreshCachedRenderTarget, aOpaque, dummy,EFalse);
     dummy.Close();
     return ret;
     }
 
 // TODO: effect area should be reduced if aClipRegion is smaller than aDisplayRect.
-TBool CHuiFxEffect::CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque, const TRegion& aClipRegion, TInt aAlpha)
+TBool CHuiFxEffect::CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque, const TRegion& aClipRegion, TBool aHasSurface, TInt aAlpha)
     {
 #ifdef HUIFX_TRACE    
     RDebug::Print(_L("CHuiFxEffect::CachedDraw - 0x%x"), this);
@@ -364,7 +364,7 @@
             if (cachedRenderTargetNeedsRefresh)
                 {
                 // Render to cached render target
-                iRoot->Draw(*iEngine, aGc, *iCachedRenderTarget, *iCachedRenderTarget);                
+                iRoot->Draw(*iEngine, aGc, *iCachedRenderTarget, *iCachedRenderTarget, aHasSurface);                
 #ifdef HUIFX_TRACE    
                 RDebug::Print(_L("CHuiFxEffect::CachedDraw - refreshed cached render buffer 0x%x"), this);
 #endif
@@ -420,13 +420,13 @@
             }
         
         // Normal drawing
-        iRoot->Draw(*iEngine, aGc, *target, *target);
+        iRoot->Draw(*iEngine, aGc, *target, *target, aHasSurface);
         }
                 
     return ETrue;    
     }
 
-EXPORT_C TBool CHuiFxEffect::Draw(CHuiGc& aGc, const TRect& aDisplayRect)
+EXPORT_C TBool CHuiFxEffect::Draw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aHasSurface)
     {
     // Prepare all layers
 #ifdef HUIFX_TRACE    
@@ -483,7 +483,7 @@
         return EFalse;
         }
 
-    iRoot->Draw(*iEngine, aGc, *target, *target);
+    iRoot->Draw(*iEngine, aGc, *target, *target, aHasSurface);
     return ETrue;
     }
 
@@ -612,6 +612,15 @@
         }
     else
         {
+#ifdef USE_MODULE_TEST_HOOKS_FOR_ALF
+        if (iFramesDrawn == 1)
+            {
+            // This is about the time when first frame from the effect is on screen
+            TTime endTime;
+            endTime.UniversalTime();
+            AMT_ADD_TIME(iHandle, endTime.Int64(), ETrue);
+            }
+#endif
         iRoot->AdvanceTime(aElapsedTime);
         }
     iElapsedTime += aElapsedTime;