| 484 | |
| 485 | |
| 486 | fl::size Corkscrew::pixelCount() const { |
| 487 | // Use variant storage if available, otherwise fall back to legacy buffer size |
| 488 | if (!mPixelStorage.empty()) { |
| 489 | if (mPixelStorage.template is<fl::span<CRGB>>()) { |
| 490 | return mPixelStorage.template get<fl::span<CRGB>>().size(); |
| 491 | } else if (mPixelStorage.template is<fl::vector_psram<CRGB>>()) { |
| 492 | return mPixelStorage.template get<fl::vector_psram<CRGB>>().size(); |
| 493 | } |
| 494 | } |
| 495 | |
| 496 | // Fall back to input size |
| 497 | return mNumLeds; |
| 498 | } |
| 499 | |
| 500 | |
| 501 |