cache virtualLength() and some cleanup

speedup for 1D->2D mapping
This commit is contained in:
Frank
2024-10-19 23:29:53 +02:00
parent 670c621ffe
commit 7c6178418a
3 changed files with 19 additions and 18 deletions

View File

@@ -255,8 +255,9 @@ void Segment::startFrame(void) {
_isValid2D = isActive() && is2D();
_brightness = currentBri(on ? opacity : 0);
// if (reverse_y) _isSimpleSegment = false; // for A/B testing
_2dWidth = is2D() ? calc_virtualWidth() : virtualLength();
_2dWidth = is2D() ? calc_virtualWidth() : calc_virtualLength();
_2dHeight = calc_virtualHeight();
_virtuallength = calc_virtualLength();
#if 0 && defined(WLED_ENABLE_HUB75MATRIX)
_firstFill = true; // dirty HACK
#endif