MCPcopy Create free account
hub / github.com/FastLED/FastLED / initializeCache

Method initializeCache

src/fl/gfx/corkscrew.cpp.hpp:205–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void Corkscrew::initializeCache() const {
206 if (!mCacheInitialized && mCachingEnabled) {
207 // Initialize cache with tiles for each LED position
208 mTileCache.resize(mNumLeds);
209
210 // Populate cache lazily
211 for (fl::size i = 0; i < mNumLeds; ++i) {
212 mTileCache[i] = calculateTileAtWrap(static_cast<float>(i));
213 }
214
215 mCacheInitialized = true;
216 }
217}
218
219CRGB* Corkscrew::rawData() {
220 // Use variant storage if available, otherwise fall back to input surface

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected