Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_full_refresh_walker.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2011 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_FULL_REFRESH_WALKER_H
8#define __KIS_FULL_REFRESH_WALKER_H
9
10#include "kis_merge_walker.h"
12
13
15{
16public:
18 using KisRefreshSubtreeWalker::Flags;
19
20public:
26
31
32 void startTrip(KisProjectionLeafSP startWith) override {
33 if(m_firstRun) {
34 m_firstRun = false;
35
38
40
41 if (!startWith->dependsOnLowerNodes()) {
43 } else {
44 KIS_SAFE_ASSERT_RECOVER_NOOP(!startWith->canHaveChildLayers());
45 }
46
47 m_firstRun = true;
48 }
49 else {
52 }
53 else {
55 }
56 }
57 }
58
59 void registerChangeRect(KisProjectionLeafSP leaf, NodePosition position) override {
62 }
63 else {
74 if(isStartLeaf(leaf)&& !leaf->isRoot()) {
75 QRect changeRect;
76 bool changeRectVaries = false;
77 std::tie(changeRect, changeRectVaries) =
80 }
81 else {
83 }
84 }
85 }
86 void registerNeedRect(KisProjectionLeafSP leaf, NodePosition position, KisRenderPassFlags renderFlags, const QRect &cropRect) override {
88 KisRefreshSubtreeWalker::registerNeedRect(leaf, position, renderFlags, cropRect);
89 }
90 else {
91 KisMergeWalker::registerNeedRect(leaf, position, renderFlags, cropRect);
92 }
93 }
102
103private:
105 bool m_firstRun { true };
106};
107
108#endif /* __KIS_FULL_REFRESH_WALKER_H */
bool isStartLeaf(KisProjectionLeafSP leaf) const
void setExplicitChangeRect(const QRect &changeRect, bool changeRectVaries)
virtual void registerChangeRect(KisProjectionLeafSP leaf, NodePosition position)
virtual void adjustMasksChangeRect(KisProjectionLeafSP firstMask)
void registerNeedRect(KisProjectionLeafSP leaf, NodePosition position, KisRenderPassFlags flags)
void startTrip(KisProjectionLeafSP startWith) override
void registerNeedRect(KisProjectionLeafSP leaf, NodePosition position, KisRenderPassFlags renderFlags, const QRect &cropRect) override
KisFullRefreshWalker(QRect cropRect, Flags flags=None)
UpdateType type() const override
void adjustMasksChangeRect(KisProjectionLeafSP firstMask) override
void registerChangeRect(KisProjectionLeafSP leaf, NodePosition position) override
void startTrip(KisProjectionLeafSP startWith) override
void startTrip(KisProjectionLeafSP startWith) override
static std::pair< QRect, bool > calculateChangeRect(KisProjectionLeafSP startWith, const QRect &requestedRect)
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
Definition kis_assert.h:130