FastLED 3.9.15
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 168 of file video.cpp.hpp.

168 {
169 if (mVideo->needsFrame(context.now)) {
170 mFx->draw(context); // use the leds in the context as a tmp buffer.
171 mByteStream->writeCRGB(
172 context.leds.data(),
173 mFx->getNumLeds()); // now write the leds to the byte stream.
174 }
175 bool ok = mVideo->draw(context.now, context.leds);
176 if (!ok) {
177 FL_WARN("VideoFxWrapper: draw failed.");
178 }
179}
VideoImplPtr mVideo
Definition video.h:110
memorybufPtr mByteStream
Definition video.h:111
#define FL_WARN(X)
Definition log.h:276

References FL_WARN, fl::DrawContext::leds, mByteStream, mFx, mVideo, and fl::DrawContext::now.

Referenced by ~VideoFxWrapper().

+ Here is the caller graph for this function: