uiacceltk/hitchcock/coretoolkit/src/HuiDisplay.cpp
changeset 19 f5bac0badc7e
parent 14 83d2d132aa58
child 21 6ce30188c5bf
equal deleted inserted replaced
14:83d2d132aa58 19:f5bac0badc7e
   636     if(!iOnForeground || IsScreenBufferLocked())
   636     if(!iOnForeground || IsScreenBufferLocked())
   637         {
   637         {
   638         return EFalse;
   638         return EFalse;
   639         }
   639         }
   640     
   640     
       
   641     if (!iForegroundTextureTransparency && iForegroundTexture)
       
   642         {
       
   643         // When we can blit foreground texture, we shouldn't need any textures in skin side.
       
   644         iEnv.Skin().ReleaseCachedTextures();
       
   645         }
       
   646     
   641     TBool useDirtyRects = (RenderSurface().Flags() & MHuiRenderSurface::EFlagUseDirtyRects) 
   647     TBool useDirtyRects = (RenderSurface().Flags() & MHuiRenderSurface::EFlagUseDirtyRects) 
   642     					  == MHuiRenderSurface::EFlagUseDirtyRects;
   648     					  == MHuiRenderSurface::EFlagUseDirtyRects;
   643  	
   649  	
   644     iWholeDisplayAreaIsDirty = EFalse;    
   650     iWholeDisplayAreaIsDirty = EFalse;    
   645     
   651     
   746 	// the clipping rectangle is not set up correctly
   752 	// the clipping rectangle is not set up correctly
   747 	// atleast if the dirty area tracking is on..
   753 	// atleast if the dirty area tracking is on..
   748 	iGc->SetPenColor(iBackgroundColor);
   754 	iGc->SetPenColor(iBackgroundColor);
   749 	iGc->InitNewFrame();
   755 	iGc->InitNewFrame();
   750 
   756 
       
   757 	
       
   758 	// if there is a fade effect in progress, we
       
   759 	// need to clear the screen as fade effect uses
       
   760 	// always blending. If we do not clear here
       
   761 	// fade leaves trails in certain situations.
       
   762 	if (iEnv.EffectsEngine()->HasActiveFadeEffect() 
       
   763 	        || RosterImpl().IsVisibleContentFrozen() // guaranteen, that transparent pixels of the UI surface are drawn correctly during layout switch.
       
   764 	        )
       
   765 	    {
       
   766         iGc->SetPenColor(KRgbBlack);
       
   767         iGc->SetPenAlpha(0);
       
   768         iGc->Disable(CHuiGc::EFeatureClipping);
       
   769         iGc->Disable(CHuiGc::EFeatureBlending);
       
   770         iGc->Clear();
       
   771 	    }
       
   772 	
       
   773 	
   751     if ( iDrawDirtyRegions )
   774     if ( iDrawDirtyRegions )
   752         {
   775         {
   753         // Show dirty. 
   776         // Show dirty. 
   754         // This will draw the whole background with black.
   777         // This will draw the whole background with black.
   755         iGc->SetPenColor(KRgbBlack);
   778         iGc->SetPenColor(KRgbBlack);
  1033         iEnv.Skin().TextureL(EHuiSkinBackgroundTexture);
  1056         iEnv.Skin().TextureL(EHuiSkinBackgroundTexture);
  1034         }
  1057         }
  1035 
  1058 
  1036     iClearBackground = aClearBackground;
  1059     iClearBackground = aClearBackground;
  1037     iBackgroundItems.Reset();
  1060     iBackgroundItems.Reset();
       
  1061     
       
  1062     // release background texture if clearing is set to None
       
  1063     if(aClearBackground == EClearNone)
       
  1064         {
       
  1065         iEnv.Skin().ReleaseTexture(EHuiSkinBackgroundTexture);
       
  1066         }
  1038     }
  1067     }
  1039 
  1068 
  1040 
  1069 
  1041 EXPORT_C void CHuiDisplay::SetBackgroundColor(const TRgb& aBackgroundColor)
  1070 EXPORT_C void CHuiDisplay::SetBackgroundColor(const TRgb& aBackgroundColor)
  1042     {
  1071     {
  1626     }
  1655     }
  1627 
  1656 
  1628 EXPORT_C void CHuiDisplay::SetForegroundTextureOptions(TBool aTransparency)
  1657 EXPORT_C void CHuiDisplay::SetForegroundTextureOptions(TBool aTransparency)
  1629     {
  1658     {
  1630     iForegroundTextureTransparency = aTransparency;
  1659     iForegroundTextureTransparency = aTransparency;
       
  1660 
       
  1661     if (!iForegroundTextureTransparency && iForegroundTexture)
       
  1662         {
       
  1663         // When we can blit foreground texture, we shouldn't need any textures in skin side.
       
  1664         iEnv.Skin().ReleaseCachedTextures();
       
  1665         }
  1631     }
  1666     }
  1632 
  1667 
  1633 void CHuiDisplay::UpdateForegroundTexture(const TRect& aRect)
  1668 void CHuiDisplay::UpdateForegroundTexture(const TRect& aRect)
  1634     {
  1669     {
  1635     if (iForegroundTexture && iForegroundBitmap && !aRect.IsEmpty())
  1670     if (iForegroundTexture && iForegroundBitmap && !aRect.IsEmpty())