rive-app / rive-android

A runtime for interactive animations on Android
https://rive.app
MIT License
350 stars 31 forks source link

Fix FPS counter #219

Closed umberto-sonnino closed 2 years ago

umberto-sonnino commented 2 years ago

Also, some housekeeping for JNIRendererSkia.

Fixes #218

umberto-sonnino commented 2 years ago

lgtm.

with the refactor its quite hard to see what changed

does this fix working out fps for multiple animations at the same time?

It does! Sorry about that, the second commit is the one with the fix, that one should be easier to read! It's just about moving the FPS variables from static into a class field so that every renderer has its own copy. The next level would be to have something similar to our Tracer so that we can attach objects that do their own calculations on it depending on top-level configuration