uiacceltk/hitchcock/coretoolkit/src/HuiLayout.cpp
branchRCL_3
changeset 19 e5af45d51884
parent 17 c9d868f1e20c
child 20 31fccae4f8a7
equal deleted inserted replaced
18:1801340c26a2 19:e5af45d51884
   492     		{
   492     		{
   493 			return;
   493 			return;
   494     		}
   494     		}
   495     	}
   495     	}
   496 
   496 
   497     if(iOpacity.Now() <= EPSILON && !Effect())
   497     if(iOpacity.Now() <= EPSILON && (Effect() && !Effect()->IsSemitransparent()))
   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         Effectable()->EffectSetOpacityAdditive(0.0f, ETrue);
   543         // Note that EHuiVisualFlagOpaqueHint improves performance a lot in cached effect drawing 
   544         // PrepareDrawL will update iEffectOpacity for current frame
   544         TBool transparent = !(Flags() & EHuiVisualFlagOpaqueHint) && iOpacity.Now() < 1.0f;
   545         if(Effect()->PrepareDrawL(aGc, area))
   545         TBool refreshCache = Changed();                
   546             {
   546         didDrawEffect =  Effect()->CachedDraw(aGc, area, refreshCache, !transparent);
   547             if(iEffectOpacity <= 0.f)
   547         }
   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         }
       
   570     if ( !didDrawEffect )
   549     if ( !didDrawEffect )
   571         {
   550         {
   572         // huilayout does not draw itself, only children.
   551         // huilayout does not draw itself, only children.
   573         }
   552         }
   574     else
   553     else