github rive-app/rive-android 11.14.2

5 hours ago

Features

GPU Canvas outside of Compose

RiveWorker(enableGPUCanvas = true) creates a worker that renders GPU Canvas content without the rememberDeferredRiveWorker composable. Like the composable, it requires opting into @ExperimentalDeferredRendering, and it doesn't improve rendering performance yet. The internal CommandQueue.createDeferred factory is removed, so code that called it through reflection needs to switch to this constructor. (Change)

Components and scripting

  • Components in Node mode can take a Mesh or an N-Slice, like an image (Editor early access). (Change)
  • Scripted interpolators, which previously worked only on keyframes, now also run on layout styles, transitions, and interpolating converters. (Change)
  • AnimaScript modules are baked with SIMD by default. x86_64 Android devices and emulators compile SIMD modules ahead of time instead of interpreting them. (Change)

Fixes

  • GPU Canvas: On Android, sized canvases failed to allocate, so GPU Canvas content rendered black, and Bitmap Cache and layer masks silently fell back. Fixes #474. (Fix, Fix)
  • Images without the Rive renderer: RiveRenderImage.fromEncoded, fromBitmap, fromRGBABytes, and fromARGBInts with RendererType.Rive crashed with a SIGSEGV on devices where the Rive renderer fails to initialize. They now create Canvas images on those devices, matching the renderer that draws them. (Fix)
  • Font fallback strategies: A FontFallbackStrategy that threw, returned null, or returned a list with a null or throwing entry aborted the process. A failed result is now treated as an empty list and reported to app.rive.RiveLog, and a bad entry is skipped. (Fix)
  • Shared files in RiveAnimationView: A File shared between many RiveAnimationViews kept one artboard for every view ever shown until the File was released. With the Canvas renderer, this could abort the process with a JNI global reference table overflow. Views now return their artboards to the File when they let go of it. (Fix)
  • File loading: A file crashed on load when every object in an artboard failed validation, or when a draw rule target pointed to a missing drawable. An object that fails to import no longer shifts the ids of the objects after it. (Fix, bundled in this commit, Fix)
  • Lists: A list row whose artboard has animations but no state machine crashed when the list's data context was rebound or a virtualized list scrolled. (Fix, bundled in this commit)
  • Skinned paths: A cubic vertex without a weight on a skinned path crashed. (Fix)
  • Script artboard inputs: An Artboard input that leads back to its own artboard, such as a script in A taking B as an input while B nests A, recursed until the stack overflowed. (Fix)
  • AnimaScript draws: A draw cut off mid-way, most often by the 200 ms time budget, left its saves open, so its transform and clip applied to everything drawn after it in later frames. (Fix)
  • AnimaScript teardown: Dropping an artboard instance that holds a scripted object could corrupt the module's references, so a later instantiate trapped with Invalid length. A file whose script holds an artboard input also crashed at teardown when that artboard's state machine had a keyboard listener. (Fix, Fix)

Performance

  • State machines advance faster. Animations without callback keys skip a per-frame scan, held poses and finished animations aren't re-applied while nothing changes, and collapsed components are skipped in the update loop. On a test file, idle advance dropped 59%, and advance with many animations playing dropped 14-23%. (Change, Change)
  • Decoded images and other large AnimaScript buffers are freed at the next frame instead of piling up in the wasm heap, and chained image decodes are spread across frames. 20 chained decodes now peak at about a tenth of the memory. (Change)

Full comparison

Don't miss a new rive-android release

NewReleases is sending notifications on new releases.