9#include <QCoreApplication>
11#include <QMutexLocker>
38template <
typename DeviceSP>
42 bool hasDeletedProjection =
false;
47 hasDeletedProjection =
true;
51 return hasDeletedProjection;
151 QScopedPointer<StoreImplementationInterface>
store;
157 m_d->store.reset(storeImpl);
158 moveToThread(qApp->thread());
168 QMutexLocker rhsLocker(&rhs.
m_d->lock);
170 m_d->image = rhs.
m_d->image;
171 m_d->store.reset(rhs.
m_d->store->clone());
174 moveToThread(qApp->thread());
184 QMutexLocker locker(&
m_d->lock);
185 if (
m_d->store->releaseDevice()) {
217 QMutexLocker locker(&
m_d->lock);
218 m_d->store->discardCaches();
223 QMutexLocker locker(&
m_d->lock);
224 m_d->store->recycleProjectionsInSafety();
244 QMutexLocker locker(&
m_d->lock);
268 QMutexLocker locker(&
m_d->lock);
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void addSpontaneousJob(KisSpontaneousJob *spontaneousJob)
void makeCloneFromRough(KisPaintDeviceSP src, const QRect &minimalRect)
void setProjectionDevice(bool value)
const KoColorSpace * colorSpace() const
QScopedPointer< Private > m_d
void setImage(KisImageWSP image)
~KisSafeNodeProjectionStoreBase()
void internalInitiateProjectionsCleanup()
friend class KisRecycleProjectionsJob
void slotInitiateProjectionsCleanup()
void recycleProjectionsInSafety()
KisSafeNodeProjectionStoreBase(const KisSafeNodeProjectionStoreBase &rhs)
KisPaintDeviceSP getDeviceLazy(KisPaintDeviceSP prototype)
KisSafeNodeProjectionStore()
KisSafeSelectionNodeProjectionStore()
KisSelectionSP getDeviceLazy(KisSelectionSP prototype)
QScopedPointer< StoreImplementationInterface > store
KisPixelSelectionSP pixelSelection
QRect selectedRect() const
StoreImplementationForDevice()
StoreImplementationInterface * clone() const override
StoreImplementationForDevice(const KisPaintDevice &prototype)
KisPaintDeviceSP getDeviceLazy(KisPaintDeviceSP prototype)
StoreImplementationInterface * clone() const override
StoreImplementationForSelection()
KisSelectionSP getDeviceLazy(KisSelectionSP prototype)
StoreImplementationForSelection(const KisSelection &prototype)
virtual void recycleProjectionsInSafety()=0
virtual StoreImplementationInterface * clone() const =0
virtual bool releaseDevice()=0
virtual ~StoreImplementationInterface()
virtual void discardCaches()=0
virtual void discardCaches() override
QVector< DeviceSP > m_cleanProjections
QVector< DeviceSP > m_dirtyProjections
bool releaseDevice() override
virtual void recycleProjectionsInSafety() override