7#ifndef __KIS_REFRESH_SUBTREE_WALKER_H
8#define __KIS_REFRESH_SUBTREE_WALKER_H
19 SkipNonRenderableNodes = 0x1,
21 DontAdjustChangeRect = 0x4,
22 ClonesDontInvalidateFrames = 0x8
52 std::pair<QRect, bool>
54 const QRect &requestedRect) {
56 if(!startWith->isLayer())
57 return std::make_pair(requestedRect,
false);
60 bool changeRectVaries =
false;
65 if (currentLeaf->isLayer() && currentLeaf->shouldBeRendered()) {
68 std::tie(leafRect, changeRectVaries) =
69 calculateChangeRect(currentLeaf, requestedRect);
71 finalChangeRect |= leafRect;
74 currentLeaf = currentLeaf->nextSibling();
77 finalChangeRect |= startWith->projectionPlane()->changeRect(finalChangeRect);
79 if (!changeRectVaries) {
83 return std::make_pair(finalChangeRect, changeRectVaries);
87 if (!m_flags.testFlag(DontAdjustChangeRect)) {
94 if (startWith->isMask()) {
103 extraUpdateLeaf = startWith->parent();
111 if (extraUpdateLeaf) {
128 if (m_flags & SkipNonRenderableNodes) {
131 if (m_flags & NoFilthyMode) {
static NodePosition calculateNodePosition(KisProjectionLeafSP leaf)
void registerCloneNotification(KisNodeSP node, NodePosition position)
QRect requestedRect() const
bool isStartLeaf(KisProjectionLeafSP leaf) const
void visitSubtreeTopToBottom(KisProjectionLeafSP startWith, SubtreeVisitFlags flags, KisRenderPassFlags renderFlags, const QRect &cropRect)
void setExplicitChangeRect(const QRect &changeRect, bool changeRectVaries)
void setClonesDontInvalidateFrames(bool value)
void setCropRect(QRect cropRect)
void registerNeedRect(KisProjectionLeafSP leaf, NodePosition position, KisRenderPassFlags flags)
Q_DECLARE_FLAGS(Flags, Flag)
UpdateType type() const override
void startTrip(KisProjectionLeafSP startWith) override
KisRefreshSubtreeWalker()
~KisRefreshSubtreeWalker() override
static std::pair< QRect, bool > calculateChangeRect(KisProjectionLeafSP startWith, const QRect &requestedRect)
KisRefreshSubtreeWalker(QRect cropRect, Flags flags=None)
Q_DECLARE_OPERATORS_FOR_FLAGS(KisRefreshSubtreeWalker::Flags)