summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-07-22 17:07:36 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2019-07-25 10:50:39 +0800
commitf1da2a7949f31f87eac5c742c8bd1ae566059733 (patch)
tree89cf7e3d2afc35e19a9ddd36f01665a7382df555 /docs
parentb7bdc8a90d0587cd3f1b00c807d29d4a72647fcd (diff)
downloadpango-f1da2a7949f31f87eac5c742c8bd1ae566059733.tar.gz
PangoWin32: Make font discovery thread-safe
Make font discovery using GDI/Unicscribe on Windows thread-safe, by: -Making the alias HashTable a part of the _PangoWin32FontMap struct, so that we only need to initialize this once when we initialize the PangoFontMap on Win32. Make sure that we fill in that hash table with the fonts items we ask from the system once and only once as we initialize the PangoWin32FontMap. -Make the warned_fonts HashTable a part of the _PangoWin32FontMap struct as well, and create the HashTable when we init the PangoWin32FontMap. -Make the access to the common HDC in pangowin32.c where Alex mentioned that could be thread-unsafe done through pango_win32_get_dc(). At this point the test-pangocairo-threads will pass in Meson, tested for 20 successive rounds using 'meson test test-pangocairo-threads'. Note that we still get the "Pango-WARNING **:hh:mm:ss.sss: All font fallbacks failed!!!", but at least we are doing much better on PangoWin32 in terms of thread-safety.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions