removed a/b testing via Reverse X (segment option)
This commit is contained in:
@@ -249,7 +249,7 @@ void IRAM_ATTR Segment::setPixelColorXY_fast(int x, int y, uint32_t col, uint32_
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0 // this is still a dangerous optimization
|
#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
|
#endif
|
||||||
|
|
||||||
// handle reverse and transpose
|
// 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 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
|
#endif
|
||||||
|
|
||||||
if (reverse ) x = cols - x - 1;
|
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;
|
if (x0 >= cols || x1 >= cols || y0 >= rows || y1 >= rows) return;
|
||||||
|
|
||||||
// WLEDMM shortcut when no grouping/spacing used
|
// 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;
|
uint32_t scaled_col = c;
|
||||||
if (simpleSegment) {
|
if (simpleSegment) {
|
||||||
// segment brightness must be pre-calculated for the "fast" setPixelColorXY variant!
|
// segment brightness must be pre-calculated for the "fast" setPixelColorXY variant!
|
||||||
|
|||||||
@@ -1005,7 +1005,7 @@ void IRAM_ATTR_YN Segment::setPixelColor(int i, uint32_t col) //WLEDMM: IRAM_ATT
|
|||||||
break;
|
break;
|
||||||
case M12_sPinwheel: {
|
case M12_sPinwheel: {
|
||||||
// WLEDMM shortcut when no grouping/spacing used
|
// 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;
|
uint32_t scaled_col = col;
|
||||||
if (simpleSegment) {
|
if (simpleSegment) {
|
||||||
// segment brightness must be pre-calculated for the "fast" setPixelColorXY variant!
|
// segment brightness must be pre-calculated for the "fast" setPixelColorXY variant!
|
||||||
@@ -1339,7 +1339,7 @@ void Segment::fill(uint32_t c) {
|
|||||||
if (is2D()) {
|
if (is2D()) {
|
||||||
// pre-calculate scaled color
|
// pre-calculate scaled color
|
||||||
uint32_t scaled_col = c;
|
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) {
|
if (simpleSegment) {
|
||||||
uint8_t _bri_t = currentBri(on ? opacity : 0);
|
uint8_t _bri_t = currentBri(on ? opacity : 0);
|
||||||
if (!_bri_t && !transitional) return;
|
if (!_bri_t && !transitional) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user