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

Method flush

valdi/src/valdi/runtime/Context/ViewNodesFrameObserver.cpp:25–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23ViewNodesFrameObserver::~ViewNodesFrameObserver() = default;
24
25void ViewNodesFrameObserver::flush() {
26 if (_values == nullptr) {
27 flushCompleteCallbacks();
28 return;
29 }
30 auto values = std::move(_values);
31
32 if (_callback != nullptr) {
33 auto param = Value(makeShared<ValueTypedArray>(TypedArrayType::Float64Array, values->toBytesView()));
34 (*_callback)({std::move(param)});
35 }
36 flushCompleteCallbacks();
37}
38
39void ViewNodesFrameObserver::flushCompleteCallbacks() {
40 auto callbacks = std::move(_layoutCompletedCallbacks);

Callers

nothing calls this directly

Calls 2

ValueClass · 0.50
toBytesViewMethod · 0.45

Tested by

no test coverage detected