|
Krita Source Code Documentation
|
#include <kis_lock_free_cache.h>
Public Member Functions | |
| T | getValue (Mode mode) const |
| void | invalidate () |
| bool | tryGetValue (T &result, Mode mode) const |
| virtual | ~KisLockFreeCacheWithModeConsistency () |
Protected Member Functions | |
| virtual T | calculateNewValue () const =0 |
Private Attributes | |
| Mode | m_mode |
| KisCacheStateValue | m_state |
| T | m_value |
Definition at line 165 of file kis_lock_free_cache.h.
|
inlinevirtual |
Definition at line 168 of file kis_lock_free_cache.h.
|
protectedpure virtual |
Calculate the value. Used by the cache internally. Reimplemented by the user.
Implemented in KisPaintDeviceCache::ExactBoundsCache, KisPaintDeviceCache::NonDefaultPixelCache, and KisPaintDeviceCache::RegionCache.
|
inline |
Calculate the value or fetch it from the cache
Definition at line 182 of file kis_lock_free_cache.h.
References KisLockFreeCacheWithModeConsistency< T, Mode >::calculateNewValue(), KisCacheStateValue::endRead(), KisCacheStateValue::endWrite(), KisLockFreeCacheWithModeConsistency< T, Mode >::m_mode, KisLockFreeCacheWithModeConsistency< T, Mode >::m_state, KisLockFreeCacheWithModeConsistency< T, Mode >::m_value, KisCacheStateValue::startRead(), and KisCacheStateValue::startWrite().
|
inline |
Notify the cache that the value has changed
Definition at line 175 of file kis_lock_free_cache.h.
References KisCacheStateValue::invalidate(), and KisLockFreeCacheWithModeConsistency< T, Mode >::m_state.
|
inline |
Definition at line 208 of file kis_lock_free_cache.h.
References KisCacheStateValue::endRead(), KisLockFreeCacheWithModeConsistency< T, Mode >::m_mode, KisLockFreeCacheWithModeConsistency< T, Mode >::m_state, KisLockFreeCacheWithModeConsistency< T, Mode >::m_value, and KisCacheStateValue::startRead().
|
mutableprivate |
Definition at line 238 of file kis_lock_free_cache.h.
|
mutableprivate |
Definition at line 236 of file kis_lock_free_cache.h.
|
mutableprivate |
Definition at line 237 of file kis_lock_free_cache.h.