FastLED 3.10.10
Loading...
Searching...
No Matches

◆ showPixels()

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

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

937 {
939
940 // Safety check: don't modify buffer if driver is currently transmitting it
941 if (mChannelData->isInUse() && !waitForInUseBuffer()) {
942 return;
943 }
944
945 // Channels created via the manager-based API (Channel::create(cfg))
946 // always resolve their driver dynamically through resolveDynamicDriver(),
947 // which handles the busKey construction, ChannelManager lookup, and
948 // diagnostics. Legacy addLeds<> controllers no longer go through Channel
949 // at all -- they route through fl::SlimBridgeController.
950 fl::shared_ptr<IChannelDriver> driver;
951#if !defined(FASTLED_DISABLE_DYNAMIC_DRIVER) || !FASTLED_DISABLE_DYNAMIC_DRIVER
952 driver = resolveDynamicDriver();
953 if (!driver) {
954 return;
955 }
956#else
957 // Dynamic-driver lookup gated out via FASTLED_DISABLE_DYNAMIC_DRIVER
958 // (#2926). The gate lets `--gc-sections` drop the resolveDynamicDriver
959 // body plus the ChannelManager::findDriverByName /
960 // selectDriverForChannel chain (~400-900 B). Under this flag, runtime
961 // Channels emit nothing -- user accepts the constraint.
962 return;
963#endif
964
965 encodeFrame(pixels);
966 submitFrame(driver);
967}
FL_NO_INLINE fl::shared_ptr< IChannelDriver > resolveDynamicDriver() FL_NO_EXCEPT
Cold slow-path helper for showPixels().
ChannelDataPtr mChannelData
Definition channel.h:454
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: