Grok 20.3.2
grk::TileCacheEntry Struct Reference

Stores a tile processor together with its cache state. More...

#include <TileCache.h>

Public Member Functions

 TileCacheEntry (ITileProcessor *p)
 TileCacheEntry ()
 ~TileCacheEntry ()

Public Attributes

ITileProcessorprocessor
bool dirty_
 True when the entry's decompressed image is stale or absent.

Detailed Description

Stores a tile processor together with its cache state.

dirty_ flag

A cache entry is dirty when its decompressed pixel data is stale or absent and the tile must be (re-)decompressed before its image can be used.

  • Newly created entries start dirty (dirty_ = true).
  • After a successful decompress the entry is marked clean (dirty_ = false).
  • The entry becomes dirty again when:
    • The progression state changes (e.g. a different layer count is requested).
    • The tile is evicted by the LRU policy (decompressed data released, but the processor and its SOT/packet metadata survive for re-decompression).

Callers use !dirty_ together with processor->getImage() to decide whether the cached tile can be returned directly or needs to go through the decompress pipeline again.

Constructor & Destructor Documentation

◆ TileCacheEntry() [1/2]

grk::TileCacheEntry::TileCacheEntry ( ITileProcessor * p)
inlineexplicit

References dirty_, and processor.

Referenced by TileCacheEntry().

◆ TileCacheEntry() [2/2]

grk::TileCacheEntry::TileCacheEntry ( )
inline

References TileCacheEntry().

◆ ~TileCacheEntry()

grk::TileCacheEntry::~TileCacheEntry ( )
inline

References processor.

Member Data Documentation

◆ dirty_

bool grk::TileCacheEntry::dirty_

True when the entry's decompressed image is stale or absent.

Referenced by TileCacheEntry().

◆ processor

ITileProcessor* grk::TileCacheEntry::processor

Referenced by TileCacheEntry(), and ~TileCacheEntry().


The documentation for this struct was generated from the following file: