this bug is hard to trigger - when a palette transition is in progress and the main loop gets delayed (wifi connect, saving large preset files) then a calculation in setCurrentPalette() could overflow leading to an infinite loop.
... transpose, mirror, reverse, grouping, spacing, size
* unlike AC WLED, when calling seg.fill(BLACK) from webserver context this usually has no effect --> added markForBlank() that shedules segment blanking at the next drawing cycle
* fill previous segment with black when size, grouping or spacing changes
similar to getPixelColor, but returns the original pixel without brightness adjustments.
* getPixelColorRestored is used by segment::sPC and segment::gPC
* getPixelColor is still used by ABL (auto brightness limiter)
* new setting in UI page: "Don't use effect palette and segment parameters" - only meaningful when "Use effect default parameters" is enabled, too.
--> effect slider defaults will still be applied, however palette, 1D2D mapping mode and other segment settings will not change.
WLEDMM: drawArc() is faster if it's NOT "super simple" as the regular M12_pArc code can do "useSymmetry" to speed things along on larger 2D layouts, but a more "complicated" segment likely uses mirroring which generates a symmetry speed-up, or other things which mean less pixels are calculated.
adding hints for the compiler for optimization.
In case your custom build complains about "const", just remove the keyword. based on e82f38e277, but going further :-)
* "const" class functions : function does not modify any class attributes ( --> "this" becomes const)
* __attribute__((pure)) : function return value depends only on the parameters and/or global variables. The function does not modify any global or static variables.
* __attribute__((const)) : function only examines arguments (no globals), and has no effects except the return value. This slightly more strict than "pure"
* hot: tells the compiler "this functions is called very often"
* cold: the opposite of hot
* mode_2Dfloatingblobs() improvements for large panels
* Segment::fillCircle() speed optimizations
* HUB75 hack (disabled by default): skip first fill(BLACK) when using double buffering (as the buffer gets cleared after each frame)
* cache width, height, and a few more values that are normally re-calculated for each pixel
* make normal sPC a bit faster
* Segment::fade_out() optimization
--> only active in FASTPATH mode, to preserve flash on small devices (8266)
--> code still needs some polishing
--> up to 20% speedup with some 2D effects (esp32, flash qio 80Mhz, -O2)
* optimized fadeToBlackBy() - don't repaint unchanged pixels
* made MIN_HEAP_SIZE configurable by build_flags
* specific error message when not enough memory for LEDs buffer