fix: Add framebuffer release/realloc and improved lazy indexing (#2563)
This commit is contained in:
@@ -77,6 +77,10 @@ void HalDisplay::deepSleep() { einkDisplay.deepSleep(); }
|
||||
|
||||
uint8_t* HalDisplay::getFrameBuffer() const { return einkDisplay.getFrameBuffer(); }
|
||||
|
||||
uint8_t* HalDisplay::lendFrameBufferStorage(uint32_t* sizeOut) { return einkDisplay.lendBuildStorage(sizeOut); }
|
||||
|
||||
void HalDisplay::returnFrameBufferStorage() { einkDisplay.returnBuildStorage(); }
|
||||
|
||||
void HalDisplay::copyGrayscaleBuffers(const uint8_t* lsbBuffer, const uint8_t* msbBuffer) {
|
||||
einkDisplay.copyGrayscaleBuffers(lsbBuffer, msbBuffer);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,14 @@ class HalDisplay {
|
||||
// Access to frame buffer
|
||||
uint8_t* getFrameBuffer() const;
|
||||
|
||||
// Lend the framebuffer's ~48 KB STORAGE to a memory-hungry phase (chapter
|
||||
// builds) without freeing it: the allocation never moves, so repeated loans
|
||||
// cannot fragment the heap (free+realloc measurably did). No display calls
|
||||
// between lend and return; the panel keeps its last refreshed image. The
|
||||
// buffer comes back white — redraw fully. Returns nullptr if already lent.
|
||||
uint8_t* lendFrameBufferStorage(uint32_t* sizeOut);
|
||||
void returnFrameBufferStorage();
|
||||
|
||||
// X3 grayscale preconditioning (OEM "AA-pre-BW(mid)" settle pass), windowed
|
||||
// to the gray region in physical panel coordinates (no-arg = full frame).
|
||||
// Call after the BW base frame is displayed and before the grayscale planes
|
||||
|
||||
Reference in New Issue
Block a user