// // DrawableFrameHostObject.h // VisionCamera // // Created by Marc Rousavy on 20.07.23. // Copyright © 2023 mrousavy. All rights reserved. // #pragma once #import #import "../Frame Processor/FrameHostObject.h" #import "../Frame Processor/Frame.h" #import #import "SkCanvas.h" #import "JsiSkCanvas.h" using namespace facebook; class JSI_EXPORT DrawableFrameHostObject: public FrameHostObject { public: explicit DrawableFrameHostObject(Frame* frame, std::shared_ptr canvas): FrameHostObject(frame), _canvas(canvas) {} public: jsi::Value get(jsi::Runtime&, const jsi::PropNameID& name) override; std::vector getPropertyNames(jsi::Runtime& rt) override; void invalidateCanvas(); private: std::shared_ptr _canvas; };