// // SkiaRenderContext.h // VisionCamera // // Created by Marc Rousavy on 02.12.22. // Copyright © 2022 mrousavy. All rights reserved. // #pragma once #import #import #import struct RenderContext { id device; id commandQueue; sk_sp skiaContext; RenderContext() { device = MTLCreateSystemDefaultDevice(); commandQueue = id(CFRetain((GrMTLHandle)[device newCommandQueue])); skiaContext = GrDirectContext::MakeMetal((__bridge void*)device, (__bridge void*)commandQueue); } };