Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P poppler
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 656
    • Issues 656
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 40
    • Merge requests 40
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poppler
  • poppler
  • Merge requests
  • !799

Open
Created Feb 02, 2021 by Michal@misoContributor
  • Report abuse
Report abuse

Fix thread safety of FT_New_Face, FT_New_Memory_Face and FT_Done_Face

  • Overview 0
  • Commits 5
  • Pipelines 3
  • Changes 4

As is stated in https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html:

"In multi-threaded applications it is easiest to use one FT_Library object per thread. In case this is too cumbersome, a single FT_Library object across threads is possible also, as long as a mutex lock is used around FT_New_Face and FT_Done_Face."

It is not well possible to use FT_Library object per thread because cairo can call _ft_done_face_uncached from any thread so this patch adds proper mutex locking around FT_New_Face, FT_New_Memory_Face and FT_Done_Face. Mutex is defined alongside FT_Library.

Unfortunately this patch depends on !798 because it touches similar regions.

Edited Feb 02, 2021 by Michal
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: thread_safe_new_done_face