servo / pathfinder

A fast, practical GPU rasterizer for fonts and vector graphics
Apache License 2.0
3.54k stars 198 forks source link

how has the pathfinder algorithm changed over time? #496

Closed wtholliday closed 2 years ago

wtholliday commented 2 years ago

I'm curious how the algorithm has changed since this initial post: http://pcwalton.github.io/2017/02/14/pathfinder.html (images are missing in the post btw)?

I went back to a change around the time of the post and was able to make sense of what's going on. I can't easily figure out what's going on with the current version though. It seems to be doing some tiling and is much more complex. After reading the post, it's not immediately apparent to me how to support multiple overlapping paths with different opacity or paths that extend beyond the viewport (i.e. stuff that wouldn't be required for rending a font atlas) while still having the nice performance characteristics.

wtholliday commented 2 years ago

This is probably enough of an explanation: https://github.com/servo/pathfinder/blob/master/doc/architecture.md