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

Method setCurrent

valdi/src/valdi/runtime/Rendering/ViewNodeRenderer.cpp:203–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void ViewNodeRenderer::setCurrent(Ref<ViewNode> viewNode) {
204 if (_currentNodeAttributeChanged) {
205 _currentNodeAttributeChanged = false;
206 if (!_currentNode->cssNeedsUpdate()) {
207 // Only flush if we don't need to do a CSS pass, otherwise we will
208 // flush after the CSS pass.
209 _currentNode->getAttributesApplier().flush(_viewTransactionScope);
210 }
211 }
212
213 _currentNode = std::move(viewNode);
214}
215
216void ViewNodeRenderer::updateCSS() {
217 auto root = _viewNodeTree.getRootViewNode();

Callers

nothing calls this directly

Calls 4

cssNeedsUpdateMethod · 0.80
getRawIdMethod · 0.80
flushMethod · 0.65
getViewNodeMethod · 0.45

Tested by

no test coverage detected