mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
posix: Resolved issue with leaks in FontFc
git-svn-id: svn://ultimatepp.org/upp/trunk@8807 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
e53bdf2fb2
commit
f56063246d
3 changed files with 5 additions and 15 deletions
|
|
@ -332,7 +332,7 @@ EXITBLOCK {
|
|||
if(bigstat) {
|
||||
total += bigstat;
|
||||
VppLog() << Sprintf(">64KB %8dx %2d%%, total %8dx %2d%%\n",
|
||||
bigstat, 100 * bigstat / sum, total, 100 * total / sum);
|
||||
bigstat, 100 * bigstat / sum, total, 100 * total / sum);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -149,8 +149,6 @@ void ChHostSkin()
|
|||
Font::SetDefaultFont(Font(fontname, (fontheight * xdpi + 512*72) / (1024*72))
|
||||
.Bold(bold).Italic(italic));
|
||||
|
||||
ClearFtFaceCache();
|
||||
|
||||
ColoredOverride(CtrlsImg::Iml(), CtrlsImg::Iml());
|
||||
|
||||
int classiq = engine == "Redmond" || engine == "Raleigh" || engine == "Glider" || engine == "Simple";
|
||||
|
|
@ -698,8 +696,6 @@ void ChHostSkin()
|
|||
GUI_AltAccessKeys_Write(1);
|
||||
GUI_AKD_Conservative_Write(0);
|
||||
|
||||
ClearFtFaceCache();
|
||||
|
||||
CurrentSoundTheme = GtkStyleString("gtk-sound-theme-name");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ NAMESPACE_UPP
|
|||
|
||||
static FT_Library sFTlib;
|
||||
|
||||
EXITBLOCK
|
||||
EXITBLOCK
|
||||
{
|
||||
if(sFTlib)
|
||||
FT_Done_FreeType(sFTlib);
|
||||
|
|
@ -89,14 +89,6 @@ struct FtFaceEntry {
|
|||
String path;
|
||||
};
|
||||
|
||||
static FtFaceEntry ft_cache[FONTCACHE];
|
||||
|
||||
void ClearFtFaceCache()
|
||||
{
|
||||
for(int i = 0; i < FONTCACHE; i++)
|
||||
ft_cache[i].font.Height(-30000);
|
||||
}
|
||||
|
||||
FT_Face (*FTFaceXft)(Font fnt, String *rpath);
|
||||
|
||||
FT_Face FTFace(Font fnt, String *rpath = NULL)
|
||||
|
|
@ -104,8 +96,10 @@ FT_Face FTFace(Font fnt, String *rpath = NULL)
|
|||
LTIMING("FTFace");
|
||||
if(FTFaceXft)
|
||||
return (*FTFaceXft)(fnt, rpath);
|
||||
static FtFaceEntry ft_cache[FONTCACHE];
|
||||
ONCELOCK {
|
||||
ClearFtFaceCache();
|
||||
for(int i = 0; i < FONTCACHE; i++)
|
||||
ft_cache[i].font.Height(-30000);
|
||||
}
|
||||
FtFaceEntry be;
|
||||
be = ft_cache[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue