My previous (rather limited) understanding of Pathfinder was that it was just a text renderer, I didn't realize that it was a more general vector graphics package. Is the idea for Pathfinder that it should be integrated into Firefox for all its vector rendering needs (SVG and so forth)?
So if I read this correctly, it's an algorithm that Firefox could use when it handles the HTML canvas tag. For instance to draw SVG or text. Is that correct? And the good thing here, is that it uses GPU instructions to determine occlusion, and thus speed up the drawing process.
What I don't get: if that's the case, shouldn't it be integrated at a lower level, i.e. not just for drawing SVG or text, but the whole of the canvas tag? Because that's where occlusion also could take place?
Yes, it would make sense to use Pathfinder for canvas as well. Some care is necessary to avoid regressing apps that read canvas data back from GPU to CPU frequently, to avoid thrashing the I/O bus, but in general it should be doable.
pcwalton|6 years ago
Thanks to Nical for the excellent writeup!
OskarS|6 years ago
jacobolus|6 years ago
If so, do people get mad that their fonts look a bit lighter than existing rasterization tools which (incorrectly) work in gammma-encoded color space?
iTokio|6 years ago
unknown|6 years ago
[deleted]
cerberusss|6 years ago
What I don't get: if that's the case, shouldn't it be integrated at a lower level, i.e. not just for drawing SVG or text, but the whole of the canvas tag? Because that's where occlusion also could take place?
pcwalton|6 years ago
In fact, Pathfinder offers a subset of the HTML canvas API which you can use in your Rust apps right now. Here's an example: https://github.com/pcwalton/pathfinder/blob/master/examples/...
justanegg|6 years ago
[deleted]