From 533c32a48d38473e2119847ef93ca176a270aea3 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Wed, 29 Mar 2023 12:03:20 +0200 Subject: [PATCH] docs: fix wrong comment --- ios/Frame Processor/FrameProcessorUtils.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Frame Processor/FrameProcessorUtils.mm b/ios/Frame Processor/FrameProcessorUtils.mm index 4cd92ad..beffae5 100644 --- a/ios/Frame Processor/FrameProcessorUtils.mm +++ b/ios/Frame Processor/FrameProcessorUtils.mm @@ -37,7 +37,7 @@ FrameProcessorCallback convertWorkletToFrameProcessorCallback(jsi::Runtime& runt return ^(Frame* frame, void* skiaCanvas) { try { - // Create cached Frame object + // create HostObject which holds the Frame auto frameHostObject = std::make_shared(frame); // Update cached Canvas object if (skiaCanvas != nullptr) { @@ -46,12 +46,12 @@ FrameProcessorCallback convertWorkletToFrameProcessorCallback(jsi::Runtime& runt } else { frameHostObject->canvas = nullptr; } - + auto argument = jsi::Object::createFromHostObject(runtime, frameHostObject); jsi::Value jsValue(std::move(argument)); // Call the Worklet with the Frame JS Host Object as an argument workletInvoker->call(runtime, jsi::Value::undefined(), &jsValue, 1); - + // After the sync Frame Processor finished executing, remove the Canvas on that Frame instance. It can no longer draw. frameHostObject->canvas = nullptr; } catch (jsi::JSError& jsError) {