2d-inc / Flare-Flutter

Load and get full control of your Rive files in a Flutter project using this library.
https://rive.app/
MIT License
2.55k stars 469 forks source link

Show some complexity measurement that approximates the cost of displaying a particular flare animation #287

Open jefflim-google opened 3 years ago

jefflim-google commented 3 years ago

Background

We are using flare animations in many portions of Google Pay, and memory consumption and frame rate are a big concern. Right now, there are no clear guidelines for content creators that will give them feedback on the cost of rendering their work.

Request

Ideally, there would be some human-digestible real-time feedback that would give artists statistics as they edit their animations to help them assess the complexity of their animation, and an idea of what they can do to improve it.

e.g.

xxx Shadows used
yyy Clip layers used
zzz ....

This animation should play at 60fps smoothly on a Pixel 1 device and iPhone 6s and is estimated to consume xx kb/Mb of memory.

(This text is purely for illustrative purposes..)

dnfield commented 3 years ago

Some low hanging fruit here would probably be anything that results in a call to canvas.saveLayer, which will be expensive.