Closed Bug 1756468 Opened 3 years ago Closed 3 years ago

Make gfxFont instances safe for use from worker threads

Categories

(Core :: Layout: Text and Fonts, defect)

defect

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This mainly means ensuring that the gfxShapedWord cache attached to gfxFont instances, as well as any other cached state such as character coverage, is accessed/updated safely.

No longer depends on: 1756466
Severity: -- → S3

We protect the shaped-word cache in each font with a RWLock, so that multiple threads can
shape in parallel using cached data; only when a new entry needs to be cached will we need
to take a write lock.

(To improve clarity, this patch also constifys a bunch of methods that do not mutate the
font instance.)

Depends on D141472

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f26f836c1575 Add locking to gfxFont, to allow worker threads to do text shaping. r=lsalzman
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/491217cd470c Add locking to gfxFont, to allow worker threads to do text shaping. r=lsalzman
Regressions: 1761429
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Blocks: 1762713
Regressions: 1763561
Flags: needinfo?(jfkthame)
Depends on: 1766832
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: