Overview
Specify a renderer to use at runtime.
Rive makes use of various different renderers depending on platform and runtime. We’re working towards unifying the default renderer used across all platforms/runtimes with the Rive Renderer.
Renderer Options and Default
You can opt-in to use a specific renderer, see Specifying a Renderer.
The table below outlines the available, and default, renderers for Rive’s runtimes:
Runtime | Default Renderer | Options |
---|---|---|
Android | Skia | Rive / Skia / Canvas |
iOS | Rive | Rive / Core Graphics / Skia (deprecated in v6.0.0) |
React Native | Skia | See iOS and Android |
Web (Canvas) | Canvas2D | Canvas2D |
Web (WebGL) | Skia | Skia |
Web (WebGL2) | Rive | Rive |
Flutter | Skia (other), Impeller (iOS) | Skia / Impeller |
Note on Rendering in Flutter
Starting in Flutter v3.10
, Impeller has replaced Skia to become the default renderer for apps on the iOS platform and may continue to be the default on future platforms over time. As such, there is a possibility of rendering and performance discrepancies when using the Rive Flutter runtime with platforms that use the Impeller renderer that may not have surfaced before. If you encounter any visual or performance errors at runtime compared to expected behavior in the Rive editor, we recommend trying the following steps to triage:
- Try running the Flutter app with the
--no-enable-impeller
flag to use the Skia renderer. If the visual discrepancy does not show when using Skia, it may be a rendering bug on Impeller. However, before raising a bug with the Flutter team, try the second point below👇
- Try running the Flutter app on the latest
master
channel. It is possible that visual bugs may be resolved on the latest Flutter commits, but not yet released in thebeta
orstable
channel. - If you are still seeing visual discrepancies with just the Impeller renderer on the latest master branch, we recommend raising a detailed issue to the Flutter Github repo with a reproducible example, and other relevant details that can help the team debug any possible issues that may be present.
Rive Renderer
The Rive Renderer is now available on Android and iOS. See Specifying a Renderer to set it as your preferred renderer.
While it’s ready for testing and your feedback is highly valued during this phase, we advise exercising caution before considering it for production builds. You may encounter compatibility issues with certain devices. Please reach out to us on Discord or through our Support Channel.
Your collaboration helps us refine and enhance the Rive Renderer to make it more robust and reliable for broader applications. Thank you for being a part of this exciting journey!
By default, Android will use the current Skia renderer, and iOS will use the Rive Renderer (as of v6.0.0).
Starting Version
The Rive Renderer was introduced in the iOS runtime starting at v5.3.2, however, we recommend installing the latest version of the dependency to get the latest updates. See the CHANGELOG for details on the latest versions. Starting in v6.0.0, Rive Renderer is used as the default on iOS / macOS.
Also note that at this time, only Apple Silicon-based Mac machines will support the Rive Renderer in macOS applications.
Performance
The Rive Renderer will shine best on iOS in memory usage as an animation plays out, in comparison to previous default renderers.
With UIKit, you’ll be able to see the best performance differences by drawing multiple times on a single RiveView
, rather than creating multiple instances of RiveView
s, or multiple RiveViewModel
s.
Example: See this stress test example to see how you can override the drawing function on RiveView
to draw multiple times on the same view, with each graphic at an offset. You can switch out the renderer with the above config and test out the performance for yourself!
Specifying a Renderer
See below for runtime instructions to enable a specific renderer.
Getting Started
Options: Rive (default) / Core Graphics / Skia (deprecated in v6.0.0)
Below are some notes on configuring the renderer in UIKit and SwiftUI.
UIKit
Set the global renderer type during your application launch:
SwiftUI
New SwiftUI applications launch with the App
protocol, but you can still add UIApplicationDelegate
functionality.
iOS
Create a new file and class called AppDelegate
as such, including a line to set the defaultRenderer
to RendererType.riveRenderer
:
Next, at the entry point of your application, use UIApplicationDelegateAdaptor
to set the AppDelegate
created above for the application delegate.
macOS
Create a new file and class called AppDelegate
as such, including a line to set the defaultRenderer
to RendererType.riveRenderer
:
Next, at the entry point of your application, use UIApplicationDelegateAdaptor
to set the AppDelegate
created above for the application delegate.
Was this page helpful?