MCPcopy Create free account
hub / github.com/Snapchat/Valdi / setLimitToViewport

Method setLimitToViewport

valdi/src/valdi/runtime/Context/ViewNode.cpp:803–818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801 if (shouldReceiveVisibilityUpdates()) {
802 auto* visibilityObserver = _viewNodeTree->getViewNodesVisibilityObserver();
803 if (visibilityObserver != nullptr) {
804 visibilityObserver->onViewNodeViewportChanged(_rawId, clipRect);
805 }
806 }
807 }
808 }
809
810 if (childrenNeedsUpdate) {
811 auto isVisible = isVisibleInViewport();
812
813 if (_childrenIndexer != nullptr) {
814 // Use our childrenIndexer if we have one, which will efficiently find the elements which
815 // have become visible or invisible
816 auto result = _childrenIndexer->findChildrenVisibility(getCalculatedViewport());
817 for (auto* childViewNode : *result.invisibleChildren) {
818 changed |=
819 childViewNode->doUpdateVisibility(getCalculatedViewport(), viewportChanged, false, visitedNodes);
820 }
821 for (auto* childViewNode : *result.visibleChildren) {

Callers 3

TESTFunction · 0.80
visitMethod · 0.80
bindMethod · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64