mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-24 07:06:36 +00:00
Preload entire font file if the font file isn't efficiently seekable, which should fix very slow startup times on Android.
This commit is contained in:
@@ -35,6 +35,8 @@ namespace PortabilityLayer
|
||||
RenderedFont *LoadCachedRenderedFont(int cacheID, int size, bool aa, int flags) const override;
|
||||
void SaveCachedRenderedFont(const RenderedFont *rfont, int cacheID, int size, bool aa, int flags) const override;
|
||||
|
||||
void PurgeCache() override;
|
||||
|
||||
static FontManagerImpl *GetInstance();
|
||||
|
||||
private:
|
||||
@@ -264,6 +266,14 @@ namespace PortabilityLayer
|
||||
stream->Close();
|
||||
}
|
||||
|
||||
void FontManagerImpl::PurgeCache()
|
||||
{
|
||||
m_systemFont->PurgeCache();
|
||||
m_applicationFont->PurgeCache();
|
||||
m_handwritingFont->PurgeCache();
|
||||
m_monospaceFont->PurgeCache();
|
||||
}
|
||||
|
||||
FontManagerImpl *FontManagerImpl::GetInstance()
|
||||
{
|
||||
return &ms_instance;
|
||||
|
Reference in New Issue
Block a user