removed a/b testing via Reverse X (segment option)

This commit is contained in:
Frank
2024-07-16 20:26:52 +02:00
parent 98bd7acf1a
commit 7a83f1759d
2 changed files with 5 additions and 5 deletions

View File

@@ -249,7 +249,7 @@ void IRAM_ATTR Segment::setPixelColorXY_fast(int x, int y, uint32_t col, uint32_
#endif
#if 0 // this is still a dangerous optimization
if ((i < UINT_MAX) && sameColor && (call > 0) && (!transitional) && (ledsrgb[i] == CRGB(col)) && (_globalLeds == nullptr)) return; // WLEDMM looks like nothing to do (but we don't trust globalleds)
if ((i < UINT_MAX) && sameColor && (call > 0) && (!transitional) && (ledsrgb[i] == CRGB(scaled_col))) return; // WLEDMM looks like nothing to do
#endif
// handle reverse and transpose
@@ -304,7 +304,7 @@ void IRAM_ATTR_YN Segment::setPixelColorXY(int x, int y, uint32_t col) //WLEDMM:
}
#if 0 // this is a dangerous optimization
if ((i < UINT_MAX) && sameColor && (call > 0) && (!transitional) && (ledsrgb[i] == CRGB(col)) && (_globalLeds == nullptr)) return; // WLEDMM looks like nothing to do (but we don't trust globalleds)
if ((i < UINT_MAX) && sameColor && (call > 0) && (!transitional) && (ledsrgb[i] == CRGB(col))) return; // WLEDMM looks like nothing to do
#endif
if (reverse ) x = cols - x - 1;
@@ -684,7 +684,7 @@ void Segment::drawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint3
if (x0 >= cols || x1 >= cols || y0 >= rows || y1 >= rows) return;
// WLEDMM shortcut when no grouping/spacing used
bool simpleSegment = !reverse && (grouping == 1) && (spacing == 0); // !reverse is just for back-to-back testing against "slow" functions
bool simpleSegment = (grouping == 1) && (spacing == 0);
uint32_t scaled_col = c;
if (simpleSegment) {
// segment brightness must be pre-calculated for the "fast" setPixelColorXY variant!

View File

@@ -1005,7 +1005,7 @@ void IRAM_ATTR_YN Segment::setPixelColor(int i, uint32_t col) //WLEDMM: IRAM_ATT
break;
case M12_sPinwheel: {
// WLEDMM shortcut when no grouping/spacing used
bool simpleSegment = !reverse && (grouping == 1) && (spacing == 0); // !reverse is just for back-to-back testing against "slow" functions
bool simpleSegment = (grouping == 1) && (spacing == 0);
uint32_t scaled_col = col;
if (simpleSegment) {
// segment brightness must be pre-calculated for the "fast" setPixelColorXY variant!
@@ -1339,7 +1339,7 @@ void Segment::fill(uint32_t c) {
if (is2D()) {
// pre-calculate scaled color
uint32_t scaled_col = c;
bool simpleSegment = !reverse && (grouping == 1) && (spacing == 0); // !reverse is just for back-to-back testing against "slow" functions
bool simpleSegment = (grouping == 1) && (spacing == 0);
if (simpleSegment) {
uint8_t _bri_t = currentBri(on ? opacity : 0);
if (!_bri_t && !transitional) return;