| 217 | } |
| 218 | |
| 219 | CRGB* 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 | |
| 234 | fl::span<CRGB> Corkscrew::data() { |
| 235 | // Use variant storage if available, otherwise fall back to input surface |