#include <kis_paint_device_cache.h>
Definition at line 31 of file kis_paint_device_cache.h.
◆ KisPaintDeviceCache() [1/2]
| KisPaintDeviceCache::KisPaintDeviceCache |
( |
KisPaintDevice * | paintDevice | ) |
|
|
inline |
Definition at line 34 of file kis_paint_device_cache.h.
40 {
41 }
NonDefaultPixelCache m_nonDefaultPixelAreaCache
RegionCache m_regionCache
KisPaintDevice * m_paintDevice
ExactBoundsCache m_exactBoundsCache
QAtomicInt m_sequenceNumber
◆ KisPaintDeviceCache() [2/2]
◆ createThumbnail()
Definition at line 93 of file kis_paint_device_cache.h.
93 {
94 QImage thumbnail;
95
96 if (h == 0 || w == 0) {
97 return thumbnail;
98 }
99
100 auto key = std::make_tuple(QSize(w, h),
oversample, boundsMode);
101
102 {
107 }
108 }
109 else {
110 readLocker.unlock();
114 }
115 }
116
117 if (thumbnail.isNull()) {
120
124 }
125
126 return thumbnail;
127 }
QReadWriteLock m_thumbnailsLock
QHash< ThumbnailCacheKey, QImage > m_thumbnails
QRect exactBounds() const
QImage createThumbnailUncached(qint32 maxw, qint32 maxh, QRect rect, qreal oversample=1, KoColorConversionTransformation::Intent renderingIntent=KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::ConversionFlags conversionFlags=KoColorConversionTransformation::internalConversionFlags())
References bounds, KisPaintDevice::createThumbnailUncached(), KisPaintDevice::exactBounds(), KisPaintDevice::extent(), m_paintDevice, m_thumbnails, m_thumbnailsLock, m_thumbnailsValid, oversample, and Precise.
◆ exactBounds()
| QRect KisPaintDeviceCache::exactBounds |
( |
| ) |
|
|
inline |
◆ exactBoundsAmortized()
| QRect KisPaintDeviceCache::exactBoundsAmortized |
( |
| ) |
|
|
inline |
The calculation of the exact bounds might be too slow in some special cases, e.g. for an empty canvas of 7k by 6k. So we just always return extent, when the exact bounds is not available.
Definition at line 68 of file kis_paint_device_cache.h.
68 {
71
72 if (!result) {
80 }
81
83 }
bool tryGetValue(T &result, Mode mode) const
References bounds, KisPaintDevice::defaultBounds(), KisPaintDevice::extent(), m_exactBoundsCache, m_paintDevice, KisLockFreeCacheWithModeConsistency< T, Mode >::tryGetValue(), and KisDefaultBoundsBase::wrapAroundMode().
◆ invalidate()
| void KisPaintDeviceCache::invalidate |
( |
| ) |
|
|
inline |
◆ nonDefaultPixelArea()
| QRect KisPaintDeviceCache::nonDefaultPixelArea |
( |
| ) |
|
|
inline |
◆ region()
◆ sequenceNumber()
| int KisPaintDeviceCache::sequenceNumber |
( |
| ) |
const |
|
inline |
◆ setupCache()
| void KisPaintDeviceCache::setupCache |
( |
| ) |
|
|
inline |
◆ m_exactBoundsCache
◆ m_nonDefaultPixelAreaCache
◆ m_paintDevice
◆ m_regionCache
◆ m_sequenceNumber
| QAtomicInt KisPaintDeviceCache::m_sequenceNumber |
|
private |
◆ m_thumbnails
◆ m_thumbnailsLock
| QReadWriteLock KisPaintDeviceCache::m_thumbnailsLock |
|
private |
◆ m_thumbnailsValid
| bool KisPaintDeviceCache::m_thumbnailsValid {false} |
|
private |
The documentation for this class was generated from the following file: