Page 1 of 1

Super fast SPI screen updates, alpha blending, antialiasing

Posted: Sat Dec 07, 2019 5:40 pm
by jeanlemotan
I uploaded some time ago a library that I've been working on: https://github.com/jeanlemotan/jlm-back-buffer.
It's meant to be used on top of the Adafruit GFX lib and should work with any SPI display supported by the adafruit lib.
It allows very fast screen refresh rates with zero flicker and configurable trade off between speed and memory usage.
On top of that it also allows transparency (alpha blending) and antialiased lines and circles for extra pretty UI graphics.

There are some benchmark results on the github page comparing it with various classic ways of doing rendering on such screens.
For example here is the data for rendering 10 items (results in FPS):

Code: Select all

GFX			Memory	Fill Circle	Fill Rect	Line		AA Line	Circle	AA Circle	Text
Adafruit raw & erase	0	39.83		48.46		60.84		N/A	36.53	N/A		9.30
Adafruit raw & clear	0	18.69		19.50		20.47		N/A	18.38	N/A		10.93
Adafruit canvas16	160K	23.83		23.59		25.32		N/A	25.34	N/A		23.79
JLM solid		55K	109.38		128.08		183.15		170.77	115.44	106.86		69.77
JLM alpha		55K	110.11		114.03		174.61		168.72	116.14	107.71		64.74
So in this test, the JLM back buffer is 3-5x faster than the Adafruit canvas16 backbuffer (both are flicker free) and 3-8x times faster than non-back-buffer methods (which are flickery) while taking ~55K memory (non-contiguous blocks, so very ESP32 friendly)