Closed Bug 1582231 Opened 4 months ago Closed 4 months ago

Remove Moz2D dependency on Cairo glyph extents

Categories

(Core :: Graphics: Text, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

Details

Attachments

(1 file)

As a follow-up to bug 1547063, it turns on that a further dependency on Cairo's glyph extents was hidden inside Moz2D.

This replaces that dependency with direct calls to query glyph bounds from the relevant APIs, all of this on the gfxFonts inside thebes, so that we don't have to descend into Moz2D across the information-loss barrier there or construct new Moz2D objects to do things. In many cases, we already have some of the metrics information available inside the gfxFonts already, so we get to reuse that now.

It also turns out that we have a gfxGlyphExtents caching layer that duplicates Cairo's own glyph metrics caching, so this should be a win in terms of resource usage.

I have endeavored to just try to faithfully reproduce the behavior of Cairo under the hood by in most cases just reproducing the code flow that was in Cairo (primarily inside the mess that is gfxGDIFont).

Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a1b851fdff16
remove Moz2D dependency on Cairo glyph extents. r=jfkthame
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.