The SWTFontProvider is Win32-internal for accessing font registries that
manage the fonts for a device at different zoom levels. Currently, this
class does not consider it's accesses' thread-safety.
This change makes the SWTFontProvider thread-safe under current usage
contexts:
- Make the internal map thread-safe as it may be modified from different
threads (used for the different devices/displays) concurrently. Using a
ConcurrentHashMap ensures that read access stays fast. Write access only
happens once per device creation.
- Document non-thread-safety of the provider's operations and the
necessity to always call it from the same thread for the same device.
All current callers fulfill this requirement, thus no race conditions
may occur.