FastLED 3.10.8
Loading...
Searching...
No Matches

◆ showPixels()

void fl::Channel::showPixels ( PixelController< RGB, 1, 0xFFFFFFFF > & pixels)
overrideprotected

Definition at line 900 of file channel.cpp.hpp.

900 {
902
903 // Safety check: don't modify buffer if driver is currently transmitting it
904 if (mChannelData->isInUse() && !waitForInUseBuffer()) {
905 return;
906 }
907
908 // Channels created via the manager-based API (Channel::create(cfg))
909 // always resolve their driver dynamically through resolveDynamicDriver(),
910 // which handles the busKey construction, ChannelManager lookup, and
911 // diagnostics. Legacy addLeds<> controllers no longer go through Channel
912 // at all -- they route through fl::SlimBridgeController.
913 fl::shared_ptr<IChannelDriver> driver;
914#if !defined(FASTLED_DISABLE_DYNAMIC_DRIVER) || !FASTLED_DISABLE_DYNAMIC_DRIVER
915 driver = resolveDynamicDriver();
916 if (!driver) {
917 return;
918 }
919#else
920 // Dynamic-driver lookup gated out via FASTLED_DISABLE_DYNAMIC_DRIVER
921 // (#2926). The gate lets `--gc-sections` drop the resolveDynamicDriver
922 // body plus the ChannelManager::findDriverByName /
923 // selectDriverForChannel chain (~400-900 B). Under this flag, runtime
924 // Channels emit nothing -- user accepts the constraint.
925 return;
926#endif
927
928 encodeFrame(pixels);
929 submitFrame(driver);
930}
FL_NO_INLINE fl::shared_ptr< IChannelDriver > resolveDynamicDriver() FL_NO_EXCEPT
Cold slow-path helper for showPixels().
ChannelDataPtr mChannelData
Definition channel.h:457
FL_NO_INLINE bool waitForInUseBuffer() FL_NO_EXCEPT
Cold helper for showPixels() when mChannelData is still in use by the driver: warns and waits for REA...
FL_NO_INLINE void encodeFrame(PixelController< RGB, 1, 0xFFFFFFFF > &pixels) FL_NO_EXCEPT
Encode pixels into mChannelData and fire onChannelDataEncoded (#4566).
FL_NO_INLINE void submitFrame(const fl::shared_ptr< IChannelDriver > &driver) FL_NO_EXCEPT
Submit the encoded frame to driver: disabled-driver drop + one-shot diagnostic, enqueue,...
#define FL_SCOPED_TRACE
Definition trace.h:128

References encodeFrame(), fl::FL_NO_EXCEPT, FL_SCOPED_TRACE, mChannelData, resolveDynamicDriver(), submitFrame(), and waitForInUseBuffer().

Referenced by StaticProfileChannel.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: