uiacceltk/hitchcock/coretoolkit/src/HuiDisplay.cpp
branchRCL_3
changeset 12 f93c875b566e
parent 10 7c5dd702d6d3
child 13 3a60ebea00d0
equal deleted inserted replaced
10:7c5dd702d6d3 12:f93c875b566e
   580     	iGotDirtyReports = ETrue;         	
   580     	iGotDirtyReports = ETrue;         	
   581    		AddDirtyRegion(dirtyRect, *iCurrentDirtyRegions);
   581    		AddDirtyRegion(dirtyRect, *iCurrentDirtyRegions);
   582     	}
   582     	}
   583     // We must only transform the (new) dirtyregion, not combine or anything else here
   583     // We must only transform the (new) dirtyregion, not combine or anything else here
   584     aDirtyRegion = transformedNewDirtyRect;
   584     aDirtyRegion = transformedNewDirtyRect;
       
   585     
       
   586     if(iScanningAlfContent)
       
   587         {
       
   588 		SetAlfContentChanged(ETrue);
       
   589         }
   585     }
   590     }
   586 
   591 
   587 
   592 
   588 void CHuiDisplay::AddDirtyRegion(const TRect& aDirtyRegion, RDirtyRegions& aRegions, TBool /*aGrow*/)
   593 void CHuiDisplay::AddDirtyRegion(const TRect& aDirtyRegion, RDirtyRegions& aRegions, TBool /*aGrow*/)
   589     {
   594     {
   631     RDebug::Print(_L("CHuiDisplay::Refresh: starting measuring."));
   636     RDebug::Print(_L("CHuiDisplay::Refresh: starting measuring."));
   632     TTime startTime;
   637     TTime startTime;
   633     startTime.UniversalTime();
   638     startTime.UniversalTime();
   634 #endif
   639 #endif
   635     
   640     
       
   641     SetAlfContentChanged(EFalse);
   636     
   642     
   637     // Prevent display refresh, if the display is on background.
   643     // Prevent display refresh, if the display is on background.
   638     if(!iOnForeground || IsScreenBufferLocked())
   644     if(!iOnForeground || IsScreenBufferLocked())
   639         {
   645         {
   640         return EFalse;
   646         return EFalse;
  1610 #else
  1616 #else
  1611     return EFalse;
  1617     return EFalse;
  1612 #endif
  1618 #endif
  1613     }
  1619     }
  1614 
  1620 
       
  1621 void CHuiDisplay::ScanningAlfContent(TBool aScanning )
       
  1622     {
       
  1623     iScanningAlfContent = aScanning;
       
  1624     }
       
  1625 
       
  1626 void CHuiDisplay::SetAlfContentChanged(TBool aChanged)
       
  1627     {
       
  1628     iDisplayContainsChangedAlfContent = aChanged;
       
  1629     }
       
  1630 
       
  1631 TBool CHuiDisplay::AlfContentChanged()
       
  1632     {
       
  1633     return iDisplayContainsChangedAlfContent;
       
  1634     }
       
  1635 
  1615 void CHuiDisplay::ClipDirtyRect(TRect& aRect, TRect aClippingRect)
  1636 void CHuiDisplay::ClipDirtyRect(TRect& aRect, TRect aClippingRect)
  1616     {
  1637     {
  1617     if (aRect.Intersects(aClippingRect))
  1638     if (aRect.Intersects(aClippingRect))
  1618         {
  1639         {
  1619         aRect.Intersection(aClippingRect);  
  1640         aRect.Intersection(aClippingRect);  
  1769     User::LeaveIfError( err );
  1790     User::LeaveIfError( err );
  1770     }
  1791     }
  1771 
  1792 
  1772 void CHuiDisplay::DoBackgroundClear()
  1793 void CHuiDisplay::DoBackgroundClear()
  1773     {
  1794     {
  1774     if(iForegroundTextureTransparency) // alf application is visible -> clear background as requested 
  1795     // Clear background for the dirty area
  1775         {
  1796     TRect dirtyRect = iTempDirtyRegions[iCurrentDirtyIndx];
  1776         // Clear background for the dirty area
  1797     if (iBackgroundItems.Count() != 0)
  1777         TRect dirtyRect = iTempDirtyRegions[iCurrentDirtyIndx];
  1798         {
  1778         if (iBackgroundItems.Count() != 0)
  1799         ClearWithBackgroundItems(dirtyRect);    
       
  1800         }
       
  1801     else
       
  1802         {
       
  1803         switch (iClearBackground)
  1779             {
  1804             {
  1780             ClearWithBackgroundItems(dirtyRect);    
  1805             case EClearWithColor:
  1781             }
       
  1782         else
       
  1783             {
       
  1784             switch (iClearBackground)
       
  1785                 {
  1806                 {
  1786                 case EClearWithColor:
  1807                 ClearWithColor(dirtyRect);                            
  1787                     {
  1808                 break;    
  1788                     ClearWithColor(dirtyRect);                            
  1809                 }
  1789                     break;    
  1810             case EClearWithSkinBackground:
  1790                     }
  1811                 {
  1791                 case EClearWithSkinBackground:
  1812                 ClearWithSkinBackground(dirtyRect);                                                    
  1792                     {
  1813                 break;    
  1793                     ClearWithSkinBackground(dirtyRect);                                                    
  1814                 }
  1794                     break;    
  1815             case EClearNone:
  1795                     }
  1816             default:
  1796                 case EClearNone:
  1817                 {
  1797                 default:
  1818                 // Don't do anything
  1798                     {
  1819                 break;    
  1799                     // Don't do anything
  1820                 }                                                
  1800                     break;    
  1821             }                                    
  1801                     }                                                
  1822         }
  1802                 }                                    
  1823     }
  1803             }
  1824 
  1804         }
       
  1805     }
       
  1806