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

Method receivedRenderRequest

valdi/src/valdi/runtime/Runtime.cpp:603–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

601void Runtime::setAutoRenderDisabled(bool autoRenderDisabled) {
602 auto oldValue = _autoRenderDisabled.exchange(autoRenderDisabled);
603
604 if (!autoRenderDisabled && oldValue) {
605 for (const auto& context : _contextManager.getAllContexts()) {
606 if (context->hasPendingRenderRequests()) {
607 getMainThreadManager().dispatch(context, [context]() { context->flushRenderRequests(); });
608 }
609 }
610 }
611}
612
613void Runtime::receivedRenderRequest(const Ref<RenderRequest>& renderRequest) {
614 auto context = _contextManager.getContext(renderRequest->getContextId());
615 if (context == nullptr) {
616 return;
617 }
618

Callers 1

Calls 6

enqueueRenderRequestMethod · 0.80
runRenderRequestMethod · 0.80
valueMethod · 0.65
getContextMethod · 0.45
getContextIdMethod · 0.45
dispatchMethod · 0.45

Tested by

no test coverage detected