FastLED 3.9.15
Loading...
Searching...
No Matches

◆ size_as_rgb()

static u32 fl::Rgbw::size_as_rgb ( u32 num_of_rgbw_pixels)
inlinestatic

Definition at line 186 of file rgbw.h.

186 {
187 // The ObjectFLED controller expects the raw pixel byte data in
188 // multiples of 3. In the case of src data not a multiple of 3, then we
189 // need to add pad bytes so that the delegate controller doesn't walk
190 // off the end of the array and invoke a buffer overflow panic.
191 num_of_rgbw_pixels = (num_of_rgbw_pixels * 4 + 2) / 3;
192 u32 extra = num_of_rgbw_pixels % 3 ? 1 : 0;
193 num_of_rgbw_pixels += extra;
194 return num_of_rgbw_pixels;
195 }

References FL_NOEXCEPT.

Referenced by fl::DrawItem::DrawItem().

+ Here is the caller graph for this function: