perf(draw) reimplement circle drawing algorithms (#2374)

* perf(draw) reimplement circle drawing algorithms

Imporve the speed of circle drawing
Add circle draw caching
Various other speed improvements

* docs describe how to use masks

* fix(draw) add missing GC root usage
This commit is contained in:
Gabor Kiss-Vamosi
2021-07-27 19:16:00 +02:00
committed by GitHub
parent e23701e2c2
commit 637b706ddc
25 changed files with 517 additions and 323 deletions

View File

@@ -250,6 +250,19 @@
# define LV_SHADOW_CACHE_SIZE 0
# endif
#endif
/* Set number of maximally cached circle data.
* The circumference of 1/4 circle are saved for anti-aliasing
* radius * 4 bytes are used per circle (the most often used radiuses are saved)
* 0: to disable caching */
#ifndef LV_CIRCLE_CACHE_SIZE
# ifdef CONFIG_LV_CIRCLE_CACHE_SIZE
# define LV_CIRCLE_CACHE_SIZE CONFIG_LV_CIRCLE_CACHE_SIZE
# else
# define LV_CIRCLE_CACHE_SIZE 4
# endif
#endif
#endif /*LV_DRAW_COMPLEX*/
/*Default image cache size. Image caching keeps the images opened.