Krita Source Code Documentation
Loading...
Searching...
No Matches
KisDabRenderingQueue.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KISDABRENDERINGQUEUE_H
8#define KISDABRENDERINGQUEUE_H
9
10#include <QScopedPointer>
11
12#include "kritadefaultpaintops_export.h"
13
14#include <QList>
16struct KisRenderedDab;
17
18#include "KisDabCacheUtils.h"
19
20class KRITADEFAULTPAINTOPS_EXPORT KisDabRenderingQueue
21{
22public:
24 virtual ~CacheInterface() {}
25 virtual void getDabType(bool hasDabInCache,
28 /* out */
30 bool *shouldUseCache) = 0;
31
33 };
34
35
36public:
39
41 qreal opacity, qreal flow);
42
43 QList<KisDabRenderingJobSP> notifyJobFinished(int seqNo, int usecsTime = -1);
44
45 QList<KisRenderedDab> takeReadyDabs(bool returnMutableDabs = false, int oneTimeLimit = -1, bool *someDabsLeft = 0);
46
47 bool hasPreparedDabs() const;
48
49 void setCacheInterface(CacheInterface *interface);
50
51 KisFixedPaintDeviceSP fetchCachedPaintDevice();
52
53 void putResourcesToCache(KisDabCacheUtils::DabRenderingResources *resources);
54 KisDabCacheUtils::DabRenderingResources* fetchResourcesFromCache();
55
56 qreal averageExecutionTime() const;
57 int averageDabSize() const;
58
59 int testingGetQueueSize() const;
60
61private:
62 struct Private;
63 const QScopedPointer<Private> m_d;
64};
65
66#endif // KISDABRENDERINGQUEUE_H
const QScopedPointer< Private > m_d
std::function< DabRenderingResources *()> ResourcesFactory
virtual void getDabType(bool hasDabInCache, KisDabCacheUtils::DabRenderingResources *resources, const KisDabCacheUtils::DabRequestInfo &request, KisDabCacheUtils::DabGenerationInfo *di, bool *shouldUseCache)=0
virtual bool hasSeparateOriginal(KisDabCacheUtils::DabRenderingResources *resources) const =0