File indexing completed on 2024-05-12 15:58:52
0001 /* 0002 * SPDX-FileCopyrightText: 2019 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #ifndef KISRECYCLEPROJECTIONSJOB_H 0007 #define KISRECYCLEPROJECTIONSJOB_H 0008 0009 #include "kis_types.h" 0010 #include "kis_spontaneous_job.h" 0011 0012 class QMutex; 0013 class KisSafeNodeProjectionStoreBase; 0014 typedef KisWeakSharedPtr<KisSafeNodeProjectionStoreBase> KisSafeNodeProjectionStoreBaseWSP; 0015 0016 /** 0017 * This is a simple job for initiating recycling of KisLayer's 0018 * projections in an exclusive context. The problem is that the 0019 * projection might still be used by update workers after it 0020 * has been disabled. So this cleaning should run in an exclusive 0021 * context. 0022 */ 0023 class KRITAIMAGE_EXPORT KisRecycleProjectionsJob : public KisSpontaneousJob 0024 { 0025 public: 0026 KisRecycleProjectionsJob(KisSafeNodeProjectionStoreBaseWSP projectionStore); 0027 0028 bool overrides(const KisSpontaneousJob *otherJob) override; 0029 void run() override; 0030 int levelOfDetail() const override; 0031 0032 QString debugName() const override; 0033 0034 private: 0035 KisSafeNodeProjectionStoreBaseWSP m_projectionStore; 0036 }; 0037 0038 #endif // KISRECYCLEPROJECTIONSJOB_H