1
0
Fork 0
forked from len0rd/rockbox

Theme Editor: Implemented caching for rendered text, added profiling info to debug build, added a 500msec delay when rendering after code changes to prevent editor from hanging on large themes

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27332 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-07-07 09:33:47 +00:00
parent 6f06793f58
commit 6d609e009f
11 changed files with 158 additions and 18 deletions

View file

@ -22,3 +22,24 @@
#include "rbfontcache.h"
QHash<QString, RBFontCache::CacheInfo*> RBFontCache::cache;
void RBFontCache::clearCache()
{
QHash<QString, CacheInfo*>::iterator i;
for(i = cache.begin(); i != cache.end(); i++)
{
CacheInfo* c = *i;
if(c->imageData)
delete c->imageData;
if(c->offsetData)
delete c->offsetData;
if(c->widthData)
delete c->widthData;
delete c;
}
cache.clear();
}