#include <kis_paint_device_cache.h>
Definition at line 15 of file kis_paint_device_cache.h.
◆ KisPaintDeviceCache() [1/2]
| KisPaintDeviceCache::KisPaintDeviceCache |
( |
KisPaintDevice * | paintDevice | ) |
|
|
inline |
Definition at line 18 of file kis_paint_device_cache.h.
24 {
25 }
NonDefaultPixelCache m_nonDefaultPixelAreaCache
RegionCache m_regionCache
KisPaintDevice * m_paintDevice
ExactBoundsCache m_exactBoundsCache
QAtomicInt m_sequenceNumber
◆ KisPaintDeviceCache() [2/2]
◆ createThumbnail()
| QImage KisPaintDeviceCache::createThumbnail |
( |
qint32 | w, |
|
|
qint32 | h, |
|
|
qreal | oversample, |
|
|
KoColorConversionTransformation::Intent | renderingIntent, |
|
|
KoColorConversionTransformation::ConversionFlags | conversionFlags ) |
|
inline |
Definition at line 77 of file kis_paint_device_cache.h.
77 {
78 QImage thumbnail;
79
80 if (h == 0 || w == 0) {
81 return thumbnail;
82 }
83
84 {
89 }
90 }
91 else {
92 readLocker.unlock();
96 }
97 }
98
99 if (thumbnail.isNull()) {
100
102
106 }
107
108 return thumbnail;
109 }
QMap< int, QMap< int, QMap< qreal, QImage > > > m_thumbnails
QReadWriteLock m_thumbnailsLock
QImage createThumbnail(qint32 maxw, qint32 maxh, QRect rect, qreal oversample=1, KoColorConversionTransformation::Intent renderingIntent=KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::ConversionFlags conversionFlags=KoColorConversionTransformation::internalConversionFlags())
QRect exactBounds() const
References KisPaintDevice::createThumbnail(), KisPaintDevice::exactBounds(), m_paintDevice, m_thumbnails, m_thumbnailsLock, m_thumbnailsValid, and oversample.
◆ 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 52 of file kis_paint_device_cache.h.
52 {
55
56 if (!result) {
64 }
65
67 }
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
| QMap<int, QMap<int, QMap<qreal,QImage> > > KisPaintDeviceCache::m_thumbnails |
|
private |
◆ 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: