makeDeferredRiveFactory function

Factory? makeDeferredRiveFactory()

Create a deferred recording factory wrapping the process ore context, or null when unsupported. One per imported file, reusable across reloads.

Implementation

Factory? makeDeferredRiveFactory() {
  if (!deferredTextureSupported) {
    return null;
  }
  final oreAddress = initGPUScriptingForPlatform();
  if (oreAddress == 0) {
    return null;
  }
  final factory = FFIDeferredFactory(Pointer<Void>.fromAddress(oreAddress));
  if (!factory.isSupported) {
    return null;
  }
  return factory;
}