uiacceltk/hitchcock/coretoolkit/src/HuiRosterImpl.cpp
branchRCL_3
changeset 20 31fccae4f8a7
parent 19 e5af45d51884
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiRosterImpl.cpp	Tue Aug 31 16:07:35 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiRosterImpl.cpp	Wed Sep 01 12:16:53 2010 +0100
@@ -500,13 +500,20 @@
         // some other part of the effect, so this workaround won't work correctly in those cases. 
         // To get those working, propably whole opacity effect handling should be re-written 
         // differently.
-        if (iEffect->IsSemitransparent() || iEffectOpacity < 1.f)
+        CHuiRosterImpl* nonconst = const_cast<CHuiRosterImpl*>(this);
+        nonconst->Effectable()->EffectSetOpacityAdditive(0.0f, ETrue);
+        // PrepareDraw will update iEffectOpacity to correct opacity for this effect frame
+        if(iEffect->PrepareDrawL(aGc, displayRect))
             {
-            iEffect->ForceCachedRenderTargetUsage(ETrue);
-            }        
-        RRegion dummy;
-        didDrawEffect = iEffect->CachedDraw(aGc, displayRect, refreshCache, opaque, dummy, EFalse, iEffectOpacity*255);        
-        dummy.Close();
+            if (iEffectOpacity < 1.f)
+                {
+                iEffect->ForceCachedRenderTargetUsage(ETrue);
+                }        
+
+            RRegion dummy;
+            didDrawEffect = iEffect->CachedDraw(aGc, displayRect, refreshCache, opaque, dummy, EFalse, iEffectOpacity*255);        
+            dummy.Close();
+            }
         }
     
     if (!didDrawEffect)
@@ -1831,12 +1838,12 @@
     SetChanged();
     }
 
-TReal32 CHuiRosterImpl::EffectOpacityTarget() const
+TReal32 CHuiRosterImpl::EffectOpacity() const
     {
     return iEffectOpacity; 
     }
 
-void CHuiRosterImpl::EffectSetOpacity(TReal32 aOpacity)
+void CHuiRosterImpl::EffectSetOpacityAdditive(TReal32 aOpacity, TBool /*aReplace*/)
     {
     iEffectOpacity = aOpacity;
     }
@@ -1877,6 +1884,11 @@
     return iIsInput1;
     }
 
+TBool CHuiRosterImpl::EffectReadyToDrawNextFrame() const
+    {
+    return ETrue;
+    }
+
 void CHuiRosterImpl::SetMemoryLevel(THuiMemoryLevel /*aLevel*/)
     {
     if ( IsVisibleContentFrozen() && !UseRenderBufferForFreeze() )