Lines Matching refs:Node
16 class Node::ScopedFlag {
18 ScopedFlag(Node* node, uint32_t flag)
19 : fNode(node)
21 , fWasSet(node->fFlags & flag) {
22 node->fFlags |= flag;
33 Node* fNode;
43 Node::Node(uint32_t invalTraits)
49 Node::~Node() {
58 void Node::observeInval(const sk_sp<Node>& node) {
59 SkASSERT(node);
60 if (!(node->fFlags & kObserverArray_Flag)) {
61 if (!node->fInvalObserver) {
62 node->fInvalObserver = this;
66 auto observers = new std::vector<Node*>();
68 observers->push_back(node->fInvalObserver);
70 node->fInvalObserverArray = observers;
71 node->fFlags |= kObserverArray_Flag;
75 SkASSERT(std::find(node->fInvalObserverArray->begin(),
76 node->fInvalObserverArray->end(), this) == node->fInvalObserverArray->end());
78 node->fInvalObserverArray->push_back(this);
81 void Node::unobserveInval(const sk_sp<Node>& node) {
82 SkASSERT(node);
83 if (!(node->fFlags & kObserverArray_Flag)) {
84 SkASSERT(node->fInvalObserver == this);
85 node->fInvalObserver = nullptr;
89 SkDEBUGCODE(const auto origSize = node->fInvalObserverArray->size());
90 node->fInvalObserverArray->erase(std::remove(node->fInvalObserverArray->begin(),
91 node->fInvalObserverArray->end(), this),
92 node->fInvalObserverArray->end());
93 SkASSERT(node->fInvalObserverArray->size() == origSize - 1);
97 void Node::forEachInvalObserver(Func&& func) const {
110 void Node::invalidate(bool damageBubbling) {
126 forEachInvalObserver([&](Node* observer) {
131 const SkRect& Node::revalidate(InvalidationController* ic, const SkMatrix& ctm) {