Summary: | Make cairo_ft thread safe | ||
---|---|---|---|
Product: | freetype | Reporter: | Marek Kasik <mkasik> |
Component: | general | Assignee: | Werner Lemberg <wl> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | highest | CC: | chris, freedesktop, mail, psychon |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
URL: | https://bugs.launchpad.net/libcairo/+bug/1199571 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Make usage of freetype thread safe |
Description
Marek Kasik
2013-09-06 13:19:58 UTC
Unfortunately that FreeType "recommendation" is red herring. First, people are free to pass around FT_Face among threads, and second, we will be leaking stuff this way, unless we add proper TLS support. At any rate. I suggest we use cairo for all glyph rasterizer instead. Chris, any chance you have some time to think about this? *** Bug 81874 has been marked as a duplicate of this bug. *** Looks like copying thread-local storage macros from pixman-compiler.h and using them to use per-thread FT_Library might easily get most of this resolved. I can take a look if no one else steps in. (In reply to Behdad Esfahbod from comment #4) > Looks like copying thread-local storage macros from pixman-compiler.h and > using them to use per-thread FT_Library might easily get most of this > resolved. I can take a look if no one else steps in. Hi Behdad, had you time to look at this already? Regards Marek So, I ended up trying to fix this in FreeType. Have made huge progress so far. Here's a tree: https://github.com/behdad/freetype/commits/ftthread And here's a standalone test: https://github.com/behdad/ftthread There's still some more work to do. I can't yet understand this crash for example: https://bugzilla.redhat.com/show_bug.cgi?id=1165471 I now have a complete patchset up here: https://github.com/behdad/freetype/commits/ftthread Will be sending upstream soon. Patchset is now upstream in FreeType. (In reply to Behdad Esfahbod from comment #9) > Patchset is now upstream in FreeType. Thank you very much for all the effort you've put into this! |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.