Performance Issues [Skia + Graphite Metal - Release]

52 views
Skip to first unread message

Mungai Brian

unread,
Oct 21, 2024, 1:00:13 PMOct 21
to skia-discuss
Hi, I am rendering a screen full of glyph paths (below) and the I feel like the performance could be better.

Here is what I am rendering:

Screenshot 2024-10-21 at 19.51.29.png

I am using the same (i.e 'auto newPath = mainSkPath') SkPath per codepoint. No functions like moveTo, lineTo, etc. are done after copying

I am varying the transformations and colors for the copied SkPaths

Here is the stack trace from Instruments Full Trace Here
Screenshot 2024-10-21 at 19.55.40.png

As you can see:
1. 41.6% spent on onDrawPath
2. 18.9% spent on Recorder::snap()
3. 13.3% spent on Context::submit()

I have looked into the trace and a lot of time (8% and 7%) is spent on allocating metal buffers, is it possible to use a MTLHeap here if I don't care too much about memory efficiency?

Any insights?
Reply all
Reply to author
Forward
0 new messages