Clear cache on prewarm
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
class FontDecompressor {
|
class FontDecompressor {
|
||||||
public:
|
public:
|
||||||
static constexpr uint16_t MAX_PAGE_GLYPHS = 512;
|
static constexpr uint16_t MAX_PAGE_GLYPHS = 512;
|
||||||
static constexpr uint8_t MAX_PAGE_SLOTS = 4; // One per font style (R/B/I/BI)
|
static constexpr uint8_t MAX_PAGE_SLOTS = 8; // Provide enough slots for heavily stylized HTML pages
|
||||||
|
|
||||||
FontDecompressor() = default;
|
FontDecompressor() = default;
|
||||||
~FontDecompressor();
|
~FontDecompressor();
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ void FontCacheManager::clearCache() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FontCacheManager::prewarmCache(int fontId, const char* utf8Text, uint8_t styleMask) {
|
void FontCacheManager::prewarmCache(int fontId, const char* utf8Text, uint8_t styleMask) {
|
||||||
|
clearCache();
|
||||||
|
|
||||||
// SD card font prewarm path: prewarm all requested styles in one call
|
// SD card font prewarm path: prewarm all requested styles in one call
|
||||||
auto sdIt = sdCardFonts_.find(fontId);
|
auto sdIt = sdCardFonts_.find(fontId);
|
||||||
if (sdIt != sdCardFonts_.end()) {
|
if (sdIt != sdCardFonts_.end()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user