refactor: Memory optimization and XTC format removal
Memory optimization: - Add LOG_STACK_WATERMARK macro for task stack monitoring - Add freeCoverBufferIfAllocated() and preloadCoverBuffer() for memory management - Improve cover buffer reuse to reduce heap fragmentation - Add grayscale buffer cleanup safety in GfxRenderer - Make grayscale rendering conditional on successful buffer allocation - Add detailed heap fragmentation logging with ESP-IDF API - Add CSS parser memory usage estimation XTC format removal: - Remove entire lib/Xtc library (XTC parser and types) - Remove XtcReaderActivity and XtcReaderChapterSelectionActivity - Remove XTC file handling from HomeActivity, SleepActivity, ReaderActivity - Remove .xtc/.xtch from supported extensions in BookManager - Remove XTC cache prefix from Md5Utils - Update web server and file browser to exclude XTC format - Clear in-memory caches when disk cache is cleared
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
#include "activities/home/MyLibraryActivity.h"
|
||||
|
||||
class Epub;
|
||||
class Xtc;
|
||||
class Txt;
|
||||
|
||||
class ReaderActivity final : public ActivityWithSubactivity {
|
||||
@@ -15,15 +14,12 @@ class ReaderActivity final : public ActivityWithSubactivity {
|
||||
const std::function<void()> onGoBack;
|
||||
const std::function<void(const std::string&, MyLibraryActivity::Tab)> onGoToLibrary;
|
||||
static std::unique_ptr<Epub> loadEpub(const std::string& path);
|
||||
static std::unique_ptr<Xtc> loadXtc(const std::string& path);
|
||||
static std::unique_ptr<Txt> loadTxt(const std::string& path);
|
||||
static bool isXtcFile(const std::string& path);
|
||||
static bool isTxtFile(const std::string& path);
|
||||
|
||||
static std::string extractFolderPath(const std::string& filePath);
|
||||
void goToLibrary(const std::string& fromBookPath = "");
|
||||
void onGoToEpubReader(std::unique_ptr<Epub> epub);
|
||||
void onGoToXtcReader(std::unique_ptr<Xtc> xtc);
|
||||
void onGoToTxtReader(std::unique_ptr<Txt> txt);
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user