| 232 | } |
| 233 | |
| 234 | fl::span<CRGB> Corkscrew::data() { |
| 235 | // Use variant storage if available, otherwise fall back to input surface |
| 236 | if (!mPixelStorage.empty()) { |
| 237 | if (mPixelStorage.template is<fl::span<CRGB>>()) { |
| 238 | return mPixelStorage.template get<fl::span<CRGB>>(); |
| 239 | } else if (mPixelStorage.template is<fl::vector_psram<CRGB>>()) { |
| 240 | auto& vec = mPixelStorage.template get<fl::vector_psram<CRGB>>(); |
| 241 | return vec; |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | // Fall back to input surface data as span |
| 246 | auto surface = getOrCreateInputSurface(); |
| 247 | return surface->span(); |
| 248 | } |
| 249 | |
| 250 | |
| 251 | void Corkscrew::readFrom(const fl::Grid<CRGB>& source_grid, bool use_multi_sampling) { |
no test coverage detected