You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RiveView is using the deprecated CVDisplayLink to manage refresh rates on macOS. Because CVDisplayLink lacks support for a preferredFrameRate, Rive cannot set this on macOS and is stuck animating in constant 120hz, consuming 2-4x the amount of necessary resources.
You can also see that the parameter is simply not used:
This would modernise Rive Metal API usage on macOS, and improve performance/decrease resource usage by up to 4x or more for majority of desktop use cases.
The text was updated successfully, but these errors were encountered:
@OskarGroth I've been looking into this - CAMetalDisplayLink is currently causing crashes on some iOS devices. In order to ensure consistency across all platforms, I'm looking into updating macOS to use CADisplayLink on >= macOS 14. This should still give you the APIs you're looking for in the mean time. Is that correct?
Description
RiveView is using the deprecated CVDisplayLink to manage refresh rates on macOS. Because CVDisplayLink lacks support for a
preferredFrameRate
, Rive cannot set this on macOS and is stuck animating in constant 120hz, consuming 2-4x the amount of necessary resources.You can also see that the parameter is simply not used:
rive-ios/Source/RiveViewModel.swift
Line 110 in 8c4b184
CVDisplayLink is deprecated in macOS 15.0:
https://developer.apple.com/documentation/corevideo/cvdisplaylink-k0k
Provide a Repro
Source
.riv
/.rev
fileExpected behavior
Rive should render according to the
preferredFrameRate
.Screenshots
Device & Versions (please complete the following information)
Additional context
First, Rive should add support for CAMetalDisplayLink on Mac which is available since macOS 14.0:
https://developer.apple.com/documentation/quartzcore/cametaldisplaylink
You can hook it up straight to the CAMetalLayer used by the RiveView. You can still fallback to CVDisplayLink on older versions.
Second, Rive should add support for the new
preferredFrameRateRange
property:https://developer.apple.com/documentation/quartzcore/cametaldisplaylink/4210308-preferredframeraterange
This would modernise Rive Metal API usage on macOS, and improve performance/decrease resource usage by up to 4x or more for majority of desktop use cases.
The text was updated successfully, but these errors were encountered: