uigraphics/AknIcon/SvgtFbsRasterizer/src/SvgtFbsRasterizer.cpp
changeset 21 4ab28fdd25ad
parent 2 abcbdabaa4c5
child 45 6ef40bf8fd34
equal deleted inserted replaced
3:e5d274d457b4 21:4ab28fdd25ad
   167             if (regBmp->DataSize() <= iCacheLimit)
   167             if (regBmp->DataSize() <= iCacheLimit)
   168                 {
   168                 {
   169                 iRecentBmps.AddFirst(*regBmp);
   169                 iRecentBmps.AddFirst(*regBmp);
   170                 iTotalRecentBmpSize += regBmp->DataSize();
   170                 iTotalRecentBmpSize += regBmp->DataSize();
   171                 }
   171                 }
       
   172             else
       
   173                 {
       
   174                 delete regBmp; // deleting the registered bitmap in a case when raster bitmap size is bigger than cache
       
   175                 }	
       
   176                 
   172             // Delete the least recently used bitmaps if the maximum size of the cache is exceeded
   177             // Delete the least recently used bitmaps if the maximum size of the cache is exceeded
   173             while (iTotalRecentBmpSize > iCacheLimit)
   178             while (iTotalRecentBmpSize > iCacheLimit)
   174                 {
   179                 {
   175                 regBmp = iRecentBmps.Last();
   180                 regBmp = iRecentBmps.Last();
   176                 iTotalRecentBmpSize -= regBmp->DataSize();
   181                 iTotalRecentBmpSize -= regBmp->DataSize();