4 ms·
Sounds like it's a framebuffer, and yes the apps draw themselves. Looking at the source code of the cursor app [0], we can see it draws the mouse cursor and sk
by Zecc 3y ago
Sounds like it's a framebuffer, and yes the apps draw themselves.
Looking at the source code of the cursor app [0], we can see it draws the mouse cursor and skips the rest. The transparent console app [1] is doing something more complicated which I haven't tried to fully understand, but which definitely involves massaging pixels and even temporarily saves pixel data in ctx.store.b1 and ctx.store.b2 so it looks like some kind of double buffering.
[0]: https://github.com/Ruddle/Fomos/blob/cba0460af59e63f46c7646f8a2f29d574ff0d722/app_cursor/src/main.rs#L75
[1]: https://github.com/Ruddle/Fomos/blob/cba0460af59e63f46c7646f8a2f29d574ff0d722/app_console/src/main.rs#L384
- RetroTechie 3y ago> The transparent console app [1] is doing something more complicated which I haven't tried to fully understand, (..) If apps draw themselves, and transparency is involved, this could need: a) Save background which is overwritten ("damage areas" is a modern description, I think?). b) Alpha blending - calculating a weighed average between background & what you're overwriting it with. c) And maybe some kind of text-buffer -> bitmap conversion (if not done ahead of time). Enough pixel massaging right there.
- NooneAtAll3 3y agoDoes this mean that apps that don't want/need to be visual are still burdened with it?