shrink HomeActivity cover cache from 48KB framebuffer to 16KB region (#2035)

This commit is contained in:
jpirnay
2026-05-19 11:05:55 +02:00
parent 60079923d9
commit 4c41f6a14a
4 changed files with 96 additions and 23 deletions
+8
View File
@@ -223,4 +223,12 @@ class GfxRenderer {
uint16_t getDisplayWidth() const { return panelWidth; }
uint16_t getDisplayHeight() const { return panelHeight; }
uint16_t getDisplayWidthBytes() const { return panelWidthBytes; }
// Region cache helpers: operate on a logical (orientation-aware) rect and
// copy only the framebuffer bytes it touches. Used by HomeActivity to snapshot
// the cover tile (~16 KB) instead of the full 48 KB framebuffer.
size_t getRegionByteSize(int logicalX, int logicalY, int logicalW, int logicalH) const;
bool copyRegionToBuffer(int logicalX, int logicalY, int logicalW, int logicalH, uint8_t* buf, size_t bufSize) const;
bool copyBufferToRegion(int logicalX, int logicalY, int logicalW, int logicalH, const uint8_t* buf,
size_t bufSize) const;
};