improved sleep screen performance and cover art
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
#include "../Activity.h"
|
||||
|
||||
#include <string>
|
||||
#include <Bitmap.h>
|
||||
|
||||
class Bitmap;
|
||||
#include <string>
|
||||
|
||||
class SleepActivity final : public Activity {
|
||||
public:
|
||||
@@ -19,7 +19,15 @@ class SleepActivity final : public Activity {
|
||||
void renderBitmapSleepScreen(const Bitmap& bitmap, const std::string& bmpPath) const;
|
||||
void renderBlankSleepScreen() const;
|
||||
|
||||
// Perimeter detection caching helpers
|
||||
static std::string getPerimeterCachePath(const std::string& bmpPath);
|
||||
bool getPerimeterIsBlack(const Bitmap& bitmap, const std::string& bmpPath) const;
|
||||
// Edge luminance caching helpers
|
||||
static std::string getEdgeCachePath(const std::string& bmpPath);
|
||||
EdgeLuminance getEdgeLuminance(const Bitmap& bitmap, const std::string& bmpPath) const;
|
||||
|
||||
// Book-level edge cache helpers (for skipping book metadata loading)
|
||||
static std::string getBookEdgeCachePath(const std::string& bookPath);
|
||||
static std::string getCoverBmpPath(const std::string& cacheDir, const std::string& bookPath, bool cropped);
|
||||
bool tryRenderCachedCoverSleep(const std::string& bookPath, bool cropped) const;
|
||||
|
||||
// Quantize luminance (0-255) to 4-level grayscale (0-3)
|
||||
static uint8_t quantizeGray(uint8_t lum);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user