Immutable description of a font instanceβs shared state.
A mutable font instance description.
A map of namespace-local font instance keys to shared keys. Weak references
are used to track the liveness of each key mapping as other consumers of
BaseFontInstance might hold strong references to the entry. A mapping from
BaseFontInstance to the shared key is then used to determine which shared
key to assign to that instance. When the weak count of the mapping is zero,
the entry is allowed to expire. Again, care must be taken when clearing
a namespace within the key map as it may cause shared key expirations that
require individual processing. Shared instance keys will be created within
the provided unique namespace.
A map of font instance data accessed concurrently from multiple threads.
A shared map from fonts key local to a namespace to shared font keys that
can be shared across many namespaces. Local keys are tracked in a hashmap
that stores a strong reference per mapping so that their count can be
tracked. A map of font templates is used to hash font templates to their
final shared key. The shared key will stay alive so long as there are
any strong references to the mapping entry. Care must be taken when
clearing namespaces of shared keys as this may trigger shared font keys
to expire which require individual processing. Shared font keys will be
created within the provided unique namespace.
A map of font keys to font templates that might hold both namespace-local
font templates as well as shared templates.
Shared font resources that may need to be passed between multiple threads
such as font templates and font instances. They are individually protected
by locks to ensure safety.