Here's Pathfinder rendering a port of the NanoVG demo, showing off its new support for HTML canvas features: https://github.com/servo/pathfinder/blob/master/examples/canvas_nanovg/src/main.rs … (Most of the rendering time goes to Gaussian blurs which have to be spec compliant in Pathfinder, unfortunately…)pic.twitter.com/P8SAZTw55A
Text layout is most of the CPU time in that benchmark. Pathfinder uses proper Unicode text shaping via HarfBuzz rather than NanoVG’s very limited support. There’s a lot of room for improvement for PF here, it’s just work.
-
-
Also, there’s the fact that NanoVG doesn’t even draw text as paths—it draws them as a bitmap using stb_truetype and caches the results, so it’s just blitting rects. PF is drawing every glyph as true vectors, which is going to be slower. I want to add a glyph cache at some point.
-
That demo is supposed to be more of an example of how to use the library as opposed to a performance benchmark.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.