MCPcopy Create free account
hub / github.com/FastLED/FastLED / rawData

Method rawData

src/fl/gfx/corkscrew.cpp.hpp:219–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219CRGB* Corkscrew::rawData() {
220 // Use variant storage if available, otherwise fall back to input surface
221 if (!mPixelStorage.empty()) {
222 if (mPixelStorage.template is<fl::span<CRGB>>()) {
223 return mPixelStorage.template get<fl::span<CRGB>>().data();
224 } else if (mPixelStorage.template is<fl::vector_psram<CRGB>>()) {
225 return mPixelStorage.template get<fl::vector_psram<CRGB>>().data();
226 }
227 }
228
229 // Fall back to input surface data
230 auto surface = getOrCreateInputSurface();
231 return surface->span().data();
232}
233
234fl::span<CRGB> Corkscrew::data() {
235 // Use variant storage if available, otherwise fall back to input surface

Callers 1

setupFunction · 0.80

Calls 3

emptyMethod · 0.45
dataMethod · 0.45
spanMethod · 0.45

Tested by

no test coverage detected