MCPcopy Create free account
hub / github.com/c3d/tao3D / insert

Method insert

tao/texture_cache.cpp:480–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478
479
480void TextureCache::insert(CachedTexture *tex, LRU &lru)
481// ----------------------------------------------------------------------------
482// Insert texture at beginning of LRU list
483// ----------------------------------------------------------------------------
484{
485 CachedTexture::Links *t = texLinksForLRU(tex, lru);
486
487#ifndef QT_NO_DEBUG
488 for (CachedTexture::Links *cur = lru.first; cur; cur = cur->next)
489 Q_ASSERT(tex != cur->tex);
490#endif
491
492 if (lru.first) lru.first->prev = t;
493 t->next = lru.first;
494 lru.first = t;
495 if (!lru.last) lru.last = lru.first;
496
497 Q_ASSERT(lru.first);
498 Q_ASSERT(lru.last);
499 Q_ASSERT(lru.last->next == NULL);
500}
501
502
503void TextureCache::relink(CachedTexture *tex, LRU &lru)

Callers 1

TextureCacheMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected