7#ifndef __KIS_PAINT_DEVICE_CACHE_H
8#define __KIS_PAINT_DEVICE_CACHE_H
11#include <QReadWriteLock>
13#include <QWriteLocker>
23 size_t result = size.width() * size.height() * qRound(
oversample * 1024);
96 if (h == 0 || w == 0) {
100 auto key = std::make_tuple(QSize(w, h),
oversample, boundsMode);
117 if (thumbnail.isNull()) {
virtual bool wrapAroundMode() const =0
T getValue(Mode mode) const
bool tryGetValue(T &result, Mode mode) const
int sequenceNumber() const
NonDefaultPixelCache m_nonDefaultPixelAreaCache
RegionCache m_regionCache
QRect exactBoundsAmortized()
KisPaintDevice * m_paintDevice
QImage createThumbnail(qint32 w, qint32 h, KisThumbnailBoundsMode boundsMode, qreal oversample, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags)
QReadWriteLock m_thumbnailsLock
QHash< ThumbnailCacheKey, QImage > m_thumbnails
KisPaintDeviceCache(KisPaintDevice *paintDevice)
QRect nonDefaultPixelArea()
ExactBoundsCache m_exactBoundsCache
KisPaintDeviceCache(const KisPaintDeviceCache &rhs)
QAtomicInt m_sequenceNumber
QRect exactBounds() const
KisDataManagerSP dataManager() const
KisDefaultBoundsBaseSP defaultBounds() const
QRect calculateExactBounds(bool nonDefaultOnly) const
QImage createThumbnailUncached(qint32 maxw, qint32 maxh, QRect rect, qreal oversample=1, KoColorConversionTransformation::Intent renderingIntent=KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::ConversionFlags conversionFlags=KoColorConversionTransformation::internalConversionFlags())
std::tuple< QSize, qreal, KisThumbnailBoundsMode > ThumbnailCacheKey
size_t qHash(const ThumbnailCacheKey &key)
QRect calculateNewValue() const override
KisPaintDevice * m_paintDevice
ExactBoundsCache(KisPaintDevice *paintDevice)
NonDefaultPixelCache(KisPaintDevice *paintDevice)
KisPaintDevice * m_paintDevice
QRect calculateNewValue() const override
KisPaintDevice * m_paintDevice
RegionCache(KisPaintDevice *paintDevice)
KisRegion calculateNewValue() const override