uiacceltk/hitchcock/coretoolkit/src/HuiLayout.cpp
branchRCL_3
changeset 52 31fccae4f8a7
parent 51 e5af45d51884
equal deleted inserted replaced
51:e5af45d51884 52:31fccae4f8a7
   492     		{
   492     		{
   493 			return;
   493 			return;
   494     		}
   494     		}
   495     	}
   495     	}
   496 
   496 
   497     if(iOpacity.Now() <= EPSILON && (Effect() && !Effect()->IsSemitransparent()))
   497     if(iOpacity.Now() <= EPSILON && !Effect())
   498         {
   498         {
   499         // This will not be visible due to being completely transparent.
   499         // This will not be visible due to being completely transparent.
   500         return;
   500         return;
   501         }
   501         }
   502 
   502 
   538     // Flag to know what we did
   538     // Flag to know what we did
   539     TBool didDrawEffect = EFalse;
   539     TBool didDrawEffect = EFalse;
   540     
   540     
   541     if (canUseEffectDrawing)
   541     if (canUseEffectDrawing)
   542         {
   542         {
   543         // Note that EHuiVisualFlagOpaqueHint improves performance a lot in cached effect drawing 
   543         Effectable()->EffectSetOpacityAdditive(0.0f, ETrue);
   544         TBool transparent = !(Flags() & EHuiVisualFlagOpaqueHint) && iOpacity.Now() < 1.0f;
   544         // PrepareDrawL will update iEffectOpacity for current frame
   545         TBool refreshCache = Changed();                
   545         if(Effect()->PrepareDrawL(aGc, area))
   546         didDrawEffect =  Effect()->CachedDraw(aGc, area, refreshCache, !transparent);
   546             {
   547         }
   547             if(iEffectOpacity <= 0.f)
   548     
   548                 {
       
   549                 if(Clipping())
       
   550                     {
       
   551                     // Restore original clipping rectangle.
       
   552                     aGc.PopClip();
       
   553                     }
       
   554 
       
   555                 
       
   556                 DrawBrushes(aGc, EHuiBrushLayerForeground);
       
   557 
       
   558                 // Restore original transformation.
       
   559                 Transform(aGc, EFalse);
       
   560                 EnterLocalProjection(aGc, EFalse);
       
   561                 return;
       
   562                 }
       
   563         
       
   564             // Note that EHuiVisualFlagOpaqueHint improves performance a lot in cached effect drawing 
       
   565             TBool transparent = !(Flags() & EHuiVisualFlagOpaqueHint) && iOpacity.Now() < 1.0f;
       
   566             TBool refreshCache = Changed();                
       
   567             didDrawEffect =  Effect()->CachedDraw(aGc, area, refreshCache, !transparent);
       
   568             }
       
   569         }
   549     if ( !didDrawEffect )
   570     if ( !didDrawEffect )
   550         {
   571         {
   551         // huilayout does not draw itself, only children.
   572         // huilayout does not draw itself, only children.
   552         }
   573         }
   553     else
   574     else