diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2024-08-17 12:15:13 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2024-08-27 08:21:11 -0700 |
commit | 399fb7a8f7ec4f7ce5cd7c910d8a8b7c7099db56 (patch) | |
tree | e96954a7c07a372ee36de9dd8b59383062fb5598 /src/overlays.h | |
parent | 62af39cb7181118d3d9c32e12aa0bcb7d273f4ee (diff) |
vcr: represent mem backend layers in nibbles
This mostly works, but the maintenance of text shadows are a
gross naive conversion of the pre-nibbles code. It would
probably be better to add the shadows @ mem->png serialization
time and not bother maintaining them at all for headless.
It seems to work well enough to exercise and evaluate memory
footprints though...
The reason for "nibbles" is to save memory. Prior to this, the
mem backend would use a byte per pixel of layer information. By
not storing the background layer in this space, the current set
of layers used can fit in 4 bits (aka a nibble).
So this commit pivots to packing two pixels worth of layer data
into each of those bytes, effectively cutting the memory
requirements of the mem backend (headless mode) in half.
It matters for embedded use cases. The next step from here to
use substantially less memory in headless mode would require a
deeper refactor where we don't maintain a bitmap style
representation at all. It's doable, but not in the cards for my
free time right now.
Diffstat (limited to 'src/overlays.h')
0 files changed, 0 insertions, 0 deletions