-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Internal: b/174239851
We had some performance issue that's related with SkPath::setIsVolatile before: #17889. That issue was closed because Skia introduced CCPR and it has a nice performance even without setIsVolatile.
Unfortunately, CCPR was later disabled #17889 (comment) and we're seeing this issue again.
In particular, here's a comparison of our cubic_bezier_perf__timeline_summary benchmark with and without setIsVolatile (using 8b201b9 and flutter/engine@1482d9b):
| without setIsVolatile | with setIsVolatile | |
|---|---|---|
| 90th_percentile_frame_rasterizer_time_millis | 24.108 | 13.95 |
| 99th_percentile_frame_rasterizer_time_millis | 47.098 | 18.366 |
In addition to the speed improvement, setIsVolatile(true) should also improve the memory usage as Skia will no longer cache the volatile paths.
As path animations get more and more popular through Rive/Flare among our customers such as "customer: money (g3)" and "customer: dream (g3)", having setIsVolatile may become more and more beneficial (see, e.g., #57686).