microcontroller tests

To keep code size small and constraining development of ctx from the beginning has been the ability to use it for antialiased resolution independent user interfaces on microcontrollers. If you have your own retained scene-graph/widget tree, or use immediate-mode-gui approaches; ctx can be used to render the scene in chunks/scanlines permitting larger displays to be driven from microcontrollers. With more RAM at disposal and some subtexture update capable LCD/OLED displays and eink, using the drawlist for storing drawing commands becomes possible - as well as the hash-caching capability to reduce inter-frame redraw and recomputations.

The performance of ctx has increased since these video were made, and making more use of RGBA8 directly in small bands is preferable to working in RGB565 like these demos did. New iterations of demos are planned, and the codesize of ctx with full HTML5 canvas API support fits modern microcontrollers, the codesize can be as small as 28kb + 20kb (ascii font) of footprint and needing as little as 5kb at runtime.

The arm-cortex-m4 at 97mhz in the card10 badge and on the TTGO ESP32 both with immediate rendering, the card10 has a 180x80 display with really high visual quality, while the TFT LCD on the ESP32 has slightly higher pixel resolution at 160x128, video from november 2019. A branch of the card10 firmware has experimental support for cross-core rendering - reusing the existing allocated framebuffer on core0, fragments of drawlists are created on core1 - in C or with micropython, and passed to core0 for rendering. core0 currently renders the batch synchronously and blocks execution of core1 until done and interesting extension is making this asynchronous allowing core1 to continue execution while core0 does rendering.

january 2020, a demo running on an esp with 320x240 RGB565 display, here the framebuffer is larger than the biggest single allocation we can afford and the deferred rendering is rendering the display in 4 chunks.

With little geometry this is fine; with more the displays starts having very visible tearing on large content changes.