Closed Bug 368799 Opened 18 years ago Closed 18 years ago

Refactor gfxPangoFont/gfxPangoFontGroup/gfxPangoTextRun

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(4 files, 1 obsolete file)

As discussed on IRC, we want to make gfxTextRun all cross-platform code based on gfxPangoTextRun's glyph storage, moving the platform-dependent glyph conversion, measurement and drawing code to gfxFont and gfxFontGroup implementations. This will greatly simplify the per-platform work required and also allow us to make the gfxTextRun interface more efficient. The first, largest step is to make this separation happen in the gfxPango code. That is what this bug is about.
Attached patch patch (obsolete) — Splinter Review
Moves all the platform-dependent code out of gfxPangoTextRun, to gfxPangoFont and gfxPangoFontGroup. Hoisting this code up to gfxTextRun should be easy after this, requiring only changes in the names of types (gfxPangoFont -> gfxFont, gfxPangoTextRun -> gfxTextRun, gfxPangoFontGroup -> gfxFontGroup) and moving members up to those base classes. But we'll have to implement Mac and Windows support at the same time since the wrapper implementations won't work anymore. This removes a few APIs that shouldn't be part of gfxTextRun: Measure/Draw/GetAdvanceWidthSpecialString (will be replaced by a simple cache of textruns in gfxFontGroup), FlushSpacingCache (not needed, spacing is never cached), and GetDecorationMetrics (callers should use fontGroup->GetFontAt(0)->GetMetrics()). I didn't want to waste time refactoring these, so I just removed them now. This will break building nsTextFrameThebes, I'll patch that up on my own (Not Part Of The Build).
Attachment #253453 - Flags: review?
Attachment #253453 - Flags: review? → review?(pavlov)
Attached patch real patchSplinter Review
Naturally, I attached the wrong patch.
Attachment #253453 - Attachment is obsolete: true
Attachment #253457 - Flags: review?(pavlov)
Attachment #253453 - Flags: review?(pavlov)
Attachment #253457 - Flags: review?(pavlov) → review+
checked in
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: