Add framebuffer release and font metadata access
Introduce methods to temporarily release the 48KB framebuffer during memory-intensive chapter builds, allowing the memory to be reused. Add font metadata query methods (hasGlyphMeta, ensureAdvance) that check glyph existence and fetch advance metrics without loading full bitmap data, avoiding expensive SD reads during layout measurement.
This commit is contained in:
@@ -60,7 +60,10 @@ void HomeActivity::loadRecentCovers(int coverHeight) {
|
||||
for (RecentBook& book : recentBooks) {
|
||||
if (!book.coverBmpPath.empty()) {
|
||||
std::string coverPath = UITheme::getCoverThumbPath(book.coverBmpPath, coverHeight);
|
||||
if (!Storage.exists(coverPath.c_str())) {
|
||||
// Missing OR a stale zero-byte sentinel (transient-failure leftover)
|
||||
// both warrant an attempt; a real thumb or a decided-coverless marker
|
||||
// (1 byte) short-circuits without opening the container.
|
||||
if (BookCoverUtils::thumbAttemptNeeded(coverPath)) {
|
||||
// If epub, generate the Continue Reading thumbnail from its cover
|
||||
if (FsHelpers::hasEpubExtension(book.path)) {
|
||||
if (!showingLoading) {
|
||||
|
||||
Reference in New Issue
Block a user