--- a/src/hbservers/hbthemeserver/hbicondatacache_p.cpp Wed Aug 18 10:05:37 2010 +0300
+++ b/src/hbservers/hbthemeserver/hbicondatacache_p.cpp Thu Sep 02 20:44:51 2010 +0300
@@ -189,7 +189,7 @@
cache->clear();
// close the sgimage driver after all the
- // sgimage items and its memory were deleted.
+ // sgimage items and its memory were deleted.
#ifdef HB_SGIMAGE_ICON
if (!goodMemory && (currentGpuCacheSize <= 0) ) {
HbSgImageRenderer::global()->terminate();
@@ -726,7 +726,7 @@
}
}
// close the sgimage driver after all the
- // sgimage items and its memory were deleted.
+ // sgimage items and its memory were deleted.
#ifdef HB_SGIMAGE_ICON
if (!goodMemory && (currentGpuCacheSize <= 0) ) {
HbSgImageRenderer::global()->terminate();
@@ -841,7 +841,22 @@
}
}
return sgImagesCount;
+}
+int HbIconDataCache::totalSgImagesCost() const
+{
+ int sgImagesCost = 0;
+ QHash<HbIconKey, HbIconCacheItem*>::const_iterator itEnd(cache->constEnd());
+ for (QHash<HbIconKey,
+ HbIconCacheItem *>::const_iterator iter = cache->constBegin();
+ iter != itEnd;
+ ++iter) {
+ HbIconCacheItem *temp = iter.value();
+ if( temp->rasterIconData.type == SGIMAGE ){
+ sgImagesCost += temp->rasterIconDataCost;
+ }
+ }
+ return sgImagesCost;
}
int HbIconDataCache::cachedPixmapCount() const