Closed Bug 1994193 Opened 3 months ago Closed 3 months ago

Try to avoid applying per-glyph Spacing adjustments if they are known to all be zero

Categories

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

enhancement
Points:
1

Tracking

()

RESOLVED FIXED
146 Branch
Tracking Status
firefox146 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

(Whiteboard: [jp-mvp])

Attachments

(1 file)

If the TEXT_ENABLE_SPACING flag is set, but we are able to determine that all the values we computed in the spacing array turned out to be zero, we may be able to optimize measurement/drawing slightly by skipping the application of these values.

This is particularly relevant when the text-autospace property is enabled, as this will force spacing values to be computed for many text frames that previously were able to omit the TEXT_ENABLE_SPACING flag and skip all this processing.

No behavior change is expected; this is just skipping some work
when we know it would be a no-op.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

Not sure if this will visibly move the needle on any of the reported text-autospace perf regressions (e.g. bug 1991421), but it seems worth doing in general.

See Also: → 1991421
Whiteboard: [jp-triage]
Points: --- → 1
Whiteboard: [jp-triage] → [jp-mvp]

Reverted this because it was causing assertion failures in nsTextFrame.cpp.

Also, please check these wpt failures.

Flags: needinfo?(jfkthame)

The failures were from bug 1994197, which landed in the same push; this should be fine by itself, so re-landing.

Flags: needinfo?(jfkthame)
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch
QA Whiteboard: [qa-triage-done-c147/b146]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: