Default drawPolygon tier (MAXN vertex cap, CHUNK accumulator px) Both kernels keep their whole working set on the stack, sized by MAXN (and CHUNK for Exact).
Kernel frame on AVR (avr-gcc 7.3 -Os, -fstack-usage; callees add ~0.2 KB):
- Exact: MAXN = 32, CHUNK = 64: 4134 B; MAXN = 8, CHUNK = 16: 989 B
- ABuffer: MAXN = 32: 2142 B; MAXN = 8: 605 B On an Uno (2 KB SRAM), a 16x16 CRGB canvas (768 B) plus FastLED and Serial leaves ~950 B of stack: enough for ABuffer, not for Exact's ~1.2 KB call chain (use ABuffer there, or a 16x8 canvas for Exact). The large tier needs ~4.5 KB of stack, so the default is 8/16 where FL_PLATFORM_HAS_SMALL_STACK (fl/system/sketch_macros.h: AVR, ESP8266's 4 KB loop() stack, Teensy LC, LPC804, ...) and 32/64 elsewhere. That is a stack-size predicate, not the flash-size FL_PLATFORM_HAS_LARGE_MEMORY tier: STM32F103C8, Teensy 3.x, Uno R4 and LPC845 sit on the low flash tier yet have the stack for 32/64. Vertices beyond MAXN are ignored; pass MAXN explicitly for larger polygons. To change the default, set these build-wide (-D compiler flag) so every translation unit sees the same Canvas default template arguments.
Definition at line 62 of file canvas.h.