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

◆ draw()

void fl::VideoFxWrapper::draw ( DrawContext context)
overridevirtual
Parameters
nowThe current time in milliseconds. Fx writers are encouraged to use this instead of millis() directly as this will more deterministic behavior.

Implements fl::Fx.

Definition at line 205 of file video.cpp.hpp.

205 {
206 if (mVideo->needsFrame(context.now)) {
207 mFx->draw(context); // use the leds in the context as a tmp buffer.
208 mByteStream->writeCRGB(
209 context.leds.data(),
210 mFx->getNumLeds()); // now write the leds to the byte stream.
211 }
212 bool ok = mVideo->draw(context.now, context.leds);
213 if (!ok) {
214 FL_WARN("VideoFxWrapper: draw failed.");
215 }
216}
VideoImplPtr mVideo
Definition video.h:144
memorybufPtr mByteStream
Definition video.h:145
#define FL_WARN(...)
Definition log.h:437

References fl::FL_NO_EXCEPT, FL_WARN, mByteStream, mFx, and mVideo.

Referenced by ~VideoFxWrapper().

+ Here is the caller graph for this function: