|
Krita Source Code Documentation
|
#include <kis_base_rects_walker.h>
Inheritance diagram for KisBaseRectsWalker:Classes | |
| struct | CloneNotification |
| struct | JobItem |
Public Types | |
| typedef QVector< CloneNotification > | CloneNotificationsVector |
| typedef QStack< JobItem > | LeafStack |
| typedef qint32 | NodePosition |
| enum | NodePositionValues { N_NORMAL = 0x00 , N_TOPMOST = 0x01 , N_BOTTOMMOST = 0x02 , N_EXTRA = 0x04 , N_ABOVE_FILTHY = 0x08 , N_FILTHY_ORIGINAL = 0x10 , N_FILTHY_PROJECTION = 0x20 , N_FILTHY = 0x40 , N_BELOW_FILTHY = 0x80 } |
| enum | SubtreeVisitFlag { None = 0x0 , SkipNonRenderableNodes = 0x1 , NoFilthyMode = 0x2 , DontNotifyClones = 0x4 } |
| enum | UpdateType { UPDATE , UPDATE_NO_FILTHY , FULL_REFRESH , FULL_REFRESH_NO_FILTHY , UNSUPPORTED } |
Public Member Functions | |
| QRect | accessRect () const |
| QRect | changeRect () const |
| bool | changeRectVaries () const |
| bool | checksumValid () |
| CloneNotificationsVector & | cloneNotifications () |
| bool | clonesDontInvalidateFrames () const |
| void | collectRects (KisNodeSP node, const QRect &requestedRect) |
| QRect | cropRect () const |
| bool | isEmpty () const |
| KisBaseRectsWalker () | |
| LeafStack & | leafStack () |
| int | levelOfDetail () const |
| bool | needRectVaries () const |
| Q_DECLARE_FLAGS (SubtreeVisitFlags, SubtreeVisitFlag) | |
| void | recalculate (const QRect &requestedRect) |
| QRect | requestedRect () const |
| void | setClonesDontInvalidateFrames (bool value) |
| void | setCropRect (QRect cropRect) |
| KisNodeSP | startNode () const |
| virtual UpdateType | type () const =0 |
| QRect | uncroppedChangeRect () const |
| virtual | ~KisBaseRectsWalker () |
Public Member Functions inherited from KisShared | |
| bool | deref () |
| bool | ref () |
| int | refCount () |
| QAtomicInt * | sharedWeakReference () |
Static Public Member Functions | |
| static KisNode::PositionToFilthy | convertPositionToFilthy (NodePosition position) |
Static Protected Member Functions | |
| static qint32 | calculateChecksum (KisProjectionLeafSP leaf, const QRect &requestedRect) |
| static NodePosition | calculateNodePosition (KisProjectionLeafSP leaf) |
| static qint32 | getGraphPosition (qint32 position) |
| static bool | hasClones (KisNodeSP node) |
Private Member Functions | |
| int | getNodeLevelOfDetail (KisProjectionLeafSP leaf) |
Private Attributes | |
| bool | m_changeRectVaries {false} |
| QRect | m_childNeedRect |
| CloneNotificationsVector | m_cloneNotifications |
| bool | m_clonesDontInvalidateFrames {false} |
| QRect | m_cropRect |
| qint32 | m_graphChecksum {0} |
| QRect | m_lastNeedRect |
| int | m_levelOfDetail {0} |
| LeafStack | m_mergeTask |
| bool | m_needRectVaries {false} |
| qint32 | m_nodeChecksum {0} |
| QRect | m_requestedRect |
| QRect | m_resultAccessRect |
| QRect | m_resultChangeRect |
| QRect | m_resultNeedRect |
| QRect | m_resultUncroppedChangeRect |
| KisNodeSP | m_startNode |
Definition at line 21 of file kis_base_rects_walker.h.
Definition at line 90 of file kis_base_rects_walker.h.
| typedef QStack<JobItem> KisBaseRectsWalker::LeafStack |
Definition at line 107 of file kis_base_rects_walker.h.
| typedef qint32 KisBaseRectsWalker::NodePosition |
Definition at line 33 of file kis_base_rects_walker.h.
Definition at line 34 of file kis_base_rects_walker.h.
| Enumerator | |
|---|---|
| None | |
| SkipNonRenderableNodes | |
| NoFilthyMode | |
| DontNotifyClones | |
Definition at line 109 of file kis_base_rects_walker.h.
| Enumerator | |
|---|---|
| UPDATE | |
| UPDATE_NO_FILTHY | |
| FULL_REFRESH | |
| FULL_REFRESH_NO_FILTHY | |
| UNSUPPORTED | |
Definition at line 24 of file kis_base_rects_walker.h.
|
inline |
Definition at line 119 of file kis_base_rects_walker.h.
|
inlinevirtual |
Definition at line 124 of file kis_base_rects_walker.h.
|
inline |
Definition at line 214 of file kis_base_rects_walker.h.
|
protected |
Copy all suitable clone layers' jobs into a separate vector to make sure we don't have dangling iterators caused by calling to visitSubtreeTopToBottom() in the loop
If a clone has complicated masks, we should prepare additional source area to ensure the rect is prepared.
Definition at line 10 of file kis_base_rects_walker.cpp.
References KisCloneLayer::copyFrom, DontNotifyClones, KisBaseRectsWalker::JobItem::m_applyRect, m_cropRect, KisBaseRectsWalker::JobItem::m_leaf, m_mergeTask, KisBaseRectsWalker::JobItem::m_position, N_ABOVE_FILTHY, N_EXTRA, N_FILTHY, KisCloneLayer::needRectOnSourceForMasks(), NoTransformMaskUpdates, pushJob(), SkipNonRenderableNodes, source(), visitSubtreeTopToBottom(), KisCloneLayer::x(), and KisCloneLayer::y().
|
inlineprotectedvirtual |
ATTENTION: we miss the first mask
Reimplemented in KisFullRefreshWalker.
Definition at line 435 of file kis_base_rects_walker.h.
References KIS_SAFE_ASSERT_RECOVER_RETURN.
|
inlinestaticprotected |
Definition at line 462 of file kis_base_rects_walker.h.
|
inlinestaticprotected |
Definition at line 267 of file kis_base_rects_walker.h.
|
inline |
Definition at line 218 of file kis_base_rects_walker.h.
|
inline |
Definition at line 230 of file kis_base_rects_walker.h.
|
inline |
Definition at line 172 of file kis_base_rects_walker.h.
References KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE.
|
inlineprotected |
Definition at line 283 of file kis_base_rects_walker.h.
|
inline |
Definition at line 210 of file kis_base_rects_walker.h.
|
inline |
Definition at line 183 of file kis_base_rects_walker.h.
Definition at line 127 of file kis_base_rects_walker.h.
References KisNode::graphSequenceNumber(), and KisNode::projectionLeaf.
|
inlinestatic |
Definition at line 55 of file kis_base_rects_walker.h.
|
inline |
Definition at line 191 of file kis_base_rects_walker.h.
|
inlineprotected |
Definition at line 301 of file kis_base_rects_walker.h.
|
inlinestaticprotected |
|
inlineprivate |
Such errors may happen during undo or too quick node removal, they shouldn't cause any real problems in Krita work.
Definition at line 484 of file kis_base_rects_walker.h.
|
inlinestaticprotected |
Definition at line 262 of file kis_base_rects_walker.h.
References KisSharedPtr< T >::data(), and KisLayer::hasClones().
|
inline |
Returns false if the walker will not perform any useful work, which may happen, when, for example, the crop rect fully cropped the requested rect
Definition at line 205 of file kis_base_rects_walker.h.
|
inlineprotected |
Definition at line 279 of file kis_base_rects_walker.h.
|
inline |
Definition at line 196 of file kis_base_rects_walker.h.
|
inline |
Definition at line 242 of file kis_base_rects_walker.h.
|
inline |
Definition at line 226 of file kis_base_rects_walker.h.
|
inlineprotected |
Definition at line 296 of file kis_base_rects_walker.h.
| KisBaseRectsWalker::Q_DECLARE_FLAGS | ( | SubtreeVisitFlags | , |
| SubtreeVisitFlag | ) |
|
inline |
Definition at line 143 of file kis_base_rects_walker.h.
References collectRects(), KIS_SAFE_ASSERT_RECOVER_RETURN, and ppVar.
|
inlineprotectedvirtual |
Called for every node we meet on a forward way of the trip.
Reimplemented in KisFullRefreshWalker.
Definition at line 317 of file kis_base_rects_walker.h.
|
inlineprotected |
Note, we do not check for (N_ABOVE_FILTHY && dependOnLowerNodes(node)) because it may lead to an infinite loop with filter layer. Activate it when it is guaranteed that it is not possible to create a filter layer above its own clone
Definition at line 336 of file kis_base_rects_walker.h.
|
inlineprotected |
Definition at line 351 of file kis_base_rects_walker.h.
|
inlineprotectedvirtual |
Called for every node we meet on a backward way of the trip.
Reimplemented in KisFullRefreshWalker.
Definition at line 358 of file kis_base_rects_walker.h.
|
inline |
Definition at line 238 of file kis_base_rects_walker.h.
|
inline |
|
inline |
Definition at line 187 of file kis_base_rects_walker.h.
|
inlineprotected |
Used by KisFullRefreshWalker as it has a special changeRect strategy
Definition at line 308 of file kis_base_rects_walker.h.
|
inline |
Definition at line 234 of file kis_base_rects_walker.h.
|
protectedpure virtual |
Initiates collecting of rects. Should be implemented in derived classes
Implemented in KisFullRefreshWalker, KisMergeWalker, KisRefreshSubtreeWalker, and KisMergeWalker.
|
pure virtual |
Implemented in KisFullRefreshWalker, KisMergeWalker, and KisRefreshSubtreeWalker.
|
inline |
Definition at line 222 of file kis_base_rects_walker.h.
|
protected |
If the node is not renderable and we don't care about hidden groups, e.g. when generating animation frames, then just skip the entire group.
registerNeedRect() and registerCloneNotification() automatically skip non-layer leafs
we didn't have a change-rect pass, so we should add clone notifications manually
In no-filthy mode we just recompose the root layer without entering any subgroups
Definition at line 73 of file kis_base_rects_walker.cpp.
References calculateNodePosition(), cropRect(), DontNotifyClones, N_ABOVE_FILTHY, N_FILTHY, NoFilthyMode, registerCloneNotification(), registerNeedRect(), SkipNonRenderableNodes, and visitSubtreeTopToBottom().
|
private |
Definition at line 514 of file kis_base_rects_walker.h.
|
private |
Definition at line 543 of file kis_base_rects_walker.h.
|
private |
Definition at line 516 of file kis_base_rects_walker.h.
|
private |
Definition at line 548 of file kis_base_rects_walker.h.
|
private |
Temporary variables
Definition at line 541 of file kis_base_rects_walker.h.
|
private |
Used for getting know whether the structure of the graph has changed since the walker was calculated
Definition at line 536 of file kis_base_rects_walker.h.
|
private |
Definition at line 544 of file kis_base_rects_walker.h.
|
private |
Definition at line 546 of file kis_base_rects_walker.h.
|
private |
Definition at line 515 of file kis_base_rects_walker.h.
|
private |
Definition at line 513 of file kis_base_rects_walker.h.
|
private |
Used for getting know whether the start node properties have changed since the walker was calculated
Definition at line 529 of file kis_base_rects_walker.h.
|
private |
Definition at line 522 of file kis_base_rects_walker.h.
|
private |
The result variables. By the end of a recursion they will store a complete data for a successful merge operation.
Definition at line 509 of file kis_base_rects_walker.h.
|
private |
Definition at line 511 of file kis_base_rects_walker.h.
|
private |
Definition at line 510 of file kis_base_rects_walker.h.
|
private |
Definition at line 512 of file kis_base_rects_walker.h.
|
private |
Used by update optimization framework
Definition at line 521 of file kis_base_rects_walker.h.