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
* fix compiler warnings (uninitialized vars, ambiguous functions calls)
* restore some lost function prototypes
* avoid negative pixel indices
* only use "fast" color_add when there is no risk of "overshooting" results
* minor optimizations
If the segment is wider than 20 pixels, we optimize calculations due to symmetry - for smaller arcs the result looks better without optimization.
As a side-effect, we have enough computing power left to go through the complete circumference, avoiding holes.