Improve pre warm caching
This commit is contained in:
@@ -50,6 +50,12 @@ void GfxRenderer::ensureSdCardFontReady(int fontId, const char* utf8Text) const
|
||||
}
|
||||
}
|
||||
|
||||
void GfxRenderer::clearSdCardFontAccumulation() const {
|
||||
for (auto& [id, font] : sdCardFonts_) {
|
||||
font->clearAccumulation();
|
||||
}
|
||||
}
|
||||
|
||||
void GfxRenderer::begin() {
|
||||
frameBuffer = display.getFrameBuffer();
|
||||
if (!frameBuffer) {
|
||||
|
||||
@@ -115,6 +115,10 @@ class GfxRenderer {
|
||||
// (which holds a const GfxRenderer&) before measuring word widths. Safe to call on
|
||||
// non-SD fonts (no-op).
|
||||
void ensureSdCardFontReady(int fontId, const char* utf8Text) const;
|
||||
// Clear the cumulative SD card font metadata cache built up by repeated
|
||||
// ensureSdCardFontReady() calls. Call between sections to bound the cumulative
|
||||
// codepoint set growth across pagination. Safe to call when no SD font is active.
|
||||
void clearSdCardFontAccumulation() const;
|
||||
|
||||
// Orientation control (affects logical width/height and coordinate transforms)
|
||||
void setOrientation(const Orientation o) { orientation.store(static_cast<int>(o), std::memory_order_relaxed); }
|
||||
|
||||
Reference in New Issue
Block a user