File indexing completed on 2025-01-26 04:11:17
0001 /* 0002 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KISDABRENDERINGEXECUTOR_H 0008 #define KISDABRENDERINGEXECUTOR_H 0009 0010 #include "kritadefaultpaintops_export.h" 0011 0012 #include <QScopedPointer> 0013 0014 #include <QList> 0015 struct KisRenderedDab; 0016 0017 #include "KisDabCacheUtils.h" 0018 0019 class KisMirrorOption; 0020 class KisPrecisionOption; 0021 class KisRunnableStrokeJobsInterface; 0022 0023 0024 class KRITADEFAULTPAINTOPS_EXPORT KisDabRenderingExecutor 0025 { 0026 public: 0027 KisDabRenderingExecutor(const KoColorSpace *cs, 0028 KisDabCacheUtils::ResourcesFactory resourcesFactory, 0029 KisRunnableStrokeJobsInterface *runnableJobsInterface, 0030 KisMirrorOption *mirrorOption = 0, 0031 KisPrecisionOption *precisionOption = 0); 0032 ~KisDabRenderingExecutor(); 0033 0034 void addDab(const KisDabCacheUtils::DabRequestInfo &request, 0035 qreal opacity, qreal flow); 0036 0037 QList<KisRenderedDab> takeReadyDabs(bool returnMutableDabs = false, int oneTimeLimit = -1, bool *someDabsLeft = 0); 0038 0039 bool hasPreparedDabs() const; 0040 0041 qreal averageDabRenderingTime() const; // msecs 0042 int averageDabSize() const; 0043 0044 private: 0045 KisDabRenderingExecutor(const KisDabRenderingExecutor &rhs) = delete; 0046 0047 struct Private; 0048 const QScopedPointer<Private> m_d; 0049 }; 0050 0051 #endif // KISDABRENDERINGEXECUTOR_H