using segment buffer instead of local buffer for PS (#4776)
- using segment buffer instead of local buffer to save FX ram - fix rendering if gamma correction is disabled - some code cleanup - Fix for low RAM: reduce number of particles dynamically - updated add and scale color functions to not use references - FPS is now more consistent and on average about 15% faster
This commit is contained in:
@@ -645,6 +645,14 @@ uint16_t Segment::virtualLength() const {
|
||||
return vLength;
|
||||
}
|
||||
|
||||
#ifndef WLED_DISABLE_2D
|
||||
// maximum length of a mapped 1D segment, used in PS for buffer allocation
|
||||
uint16_t Segment::maxMappingLength() const {
|
||||
uint32_t vW = virtualWidth();
|
||||
uint32_t vH = virtualHeight();
|
||||
return max(sqrt32_bw(vH*vH + vW*vW), (uint32_t)getPinwheelLength(vW, vH)); // use diagonal
|
||||
}
|
||||
#endif
|
||||
// pixel is clipped if it falls outside clipping range
|
||||
// if clipping start > stop the clipping range is inverted
|
||||
bool IRAM_ATTR_YN Segment::isPixelClipped(int i) const {
|
||||
|
||||
Reference in New Issue
Block a user