3 ms·
Why are toolkits still rendered on the CPU?
by MBCook 3y ago
Why are toolkits still rendered on the CPU?
- pcwalton 3y agoIt's a ton of effort to write a GPU vector renderer that's both compatible with existing apps and faster than the CPU. Switching to SkiaGL would probably be the easiest approach to migrate to GPU rendering, but Skia is notoriously difficult to use outside of Google's codebases. (The running joke being "the recommended way to build Skia is to get a job at Google, but there are some workarounds available if for some reason that isn't practical.")
- flopsamjetsam 3y agoI love this joke! We use Skia as a PDF renderer and it does take a bit of plumbing to get it in, plus you have to track it more often than we'd like (that's not a fault of the build environment, but rather it doesn't have a stable API), plus we have local mods.
- cyberax 3y agoHigh-quality text rendering on GPU is surprisingly tricky and inefficient, unless you're using something simple like a glyph cache.
- spookie 3y agoDoes something like Signed Distance Fields help or is it just be an added value and not a complete different way of doing it?
- ahartmetz 3y agoQML uses it, but it doesn't look as good as FreeType with LCD subpixel rendering and light hinting... if that is what you like (it is what I like).
- pcwalton 3y agoOnly for certain fonts at certain sizes, and only if you have the SDF generated ahead of time, both of which mean that the technique isn't general enough to render arbitrary fonts in .otf format. Rasterizing small glyphs is super fast anyway, there's not much of a need to accelerate it if you can just cache the glyph bitmaps.