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:
parent
6f06793f58
commit
6d609e009f
11 changed files with 158 additions and 18 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue