uiacceltk/hitchcock/coretoolkit/src/HuiLayout.cpp
branchRCL_3
changeset 52 31fccae4f8a7
parent 51 e5af45d51884
--- a/uiacceltk/hitchcock/coretoolkit/src/HuiLayout.cpp	Tue Aug 31 16:07:35 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/HuiLayout.cpp	Wed Sep 01 12:16:53 2010 +0100
@@ -494,7 +494,7 @@
     		}
     	}
 
-    if(iOpacity.Now() <= EPSILON && (Effect() && !Effect()->IsSemitransparent()))
+    if(iOpacity.Now() <= EPSILON && !Effect())
         {
         // This will not be visible due to being completely transparent.
         return;
@@ -540,12 +540,33 @@
     
     if (canUseEffectDrawing)
         {
-        // Note that EHuiVisualFlagOpaqueHint improves performance a lot in cached effect drawing 
-        TBool transparent = !(Flags() & EHuiVisualFlagOpaqueHint) && iOpacity.Now() < 1.0f;
-        TBool refreshCache = Changed();                
-        didDrawEffect =  Effect()->CachedDraw(aGc, area, refreshCache, !transparent);
+        Effectable()->EffectSetOpacityAdditive(0.0f, ETrue);
+        // PrepareDrawL will update iEffectOpacity for current frame
+        if(Effect()->PrepareDrawL(aGc, area))
+            {
+            if(iEffectOpacity <= 0.f)
+                {
+                if(Clipping())
+                    {
+                    // Restore original clipping rectangle.
+                    aGc.PopClip();
+                    }
+
+                
+                DrawBrushes(aGc, EHuiBrushLayerForeground);
+
+                // Restore original transformation.
+                Transform(aGc, EFalse);
+                EnterLocalProjection(aGc, EFalse);
+                return;
+                }
+        
+            // Note that EHuiVisualFlagOpaqueHint improves performance a lot in cached effect drawing 
+            TBool transparent = !(Flags() & EHuiVisualFlagOpaqueHint) && iOpacity.Now() < 1.0f;
+            TBool refreshCache = Changed();                
+            didDrawEffect =  Effect()->CachedDraw(aGc, area, refreshCache, !transparent);
+            }
         }
-    
     if ( !didDrawEffect )
         {
         // huilayout does not draw itself, only children.