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

Method doFlushViewOperations

valdi/src/valdi/android/ViewManager.cpp:298–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298void ViewManager::doFlushViewOperations(const std::optional<SerializedViewOperations>& operations, bool sync) {
299 VALDI_TRACE("Valdi.flushOperations");
300
301 if (operations) {
302 const auto& buffer = operations.value().buffer;
303 const auto& attachedValues = operations.value().attachedValues;
304 auto byteBuffer = ValdiAndroid::toByteBuffer(
305 getEnv(), const_cast<void*>(reinterpret_cast<const void*>(buffer->data())), buffer->size());
306 auto objectJArray = ValdiAndroid::toJavaObject(getEnv(), attachedValues);
307
308 _performViewOperationsMethod.call(toObject(), byteBuffer, objectJArray, sync);
309 } else {
310 _performViewOperationsMethod.call(toObject(), JavaObject(getEnv()), ObjectArray(getEnv()), sync);
311 }
312}
313
314Valdi::Ref<Valdi::IViewTransaction> ViewManager::createViewTransaction(
315 const Valdi::Ref<Valdi::MainThreadManager>& mainThreadManager, bool shouldDefer) {

Callers

nothing calls this directly

Calls 10

toByteBufferFunction · 0.85
toJavaObjectFunction · 0.85
toObjectFunction · 0.85
ObjectArrayClass · 0.85
valueMethod · 0.65
callMethod · 0.65
getEnvFunction · 0.50
JavaObjectClass · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected