mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
9f767ee84a
gfxFontCache acquires and releases its mutex during various operations. In order to keep the state internally consistent, we should only release the lock after the full operation is complete. This involves moving the deletion of gfxFont to outside the lock via a temporary discard array. The expiration state should not be protected by the gfxFont's mutex since we don't hold it during most operations. Instead we should hold gfxFontCache's mutex because then we can guarantee the operation is atomic, particularly when a worker wants a font, and the main thread is aging the generations. When a font is returned from gfxFontCache, we now return it already removed from the tracker, and with its refcount updated. This avoids any potential races between the expiration timer and a worker accessing the font, as well as simplying the callers so they don't need to be aware of addref-ing manually in case the result is to be discarded (so that it gets readded to the tracker). Differential Revision: https://phabricator.services.mozilla.com/D151821 |
||
---|---|---|
.. | ||
2d | ||
angle | ||
cairo | ||
config | ||
docs | ||
gl | ||
graphite2 | ||
harfbuzz | ||
ipc | ||
layers | ||
ots | ||
qcms | ||
skia | ||
src | ||
tests | ||
thebes | ||
vr | ||
webrender_bindings | ||
wgpu_bindings | ||
wr | ||
ycbcr | ||
metrics.yaml | ||
moz.build |