Closed Bug 1480801 Opened 7 years ago Closed 1 year ago

Merge consecutive FillGlyph draw commands with compatible parameters

Categories

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

enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: rhunt, Unassigned)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(4 files, 1 obsolete file)

From local testing on my alexa top 50 simulation [1]. This can result in a ~20% average improvement to command list size. [1] https://github.com/eqrion/moz-simulation-script
Blocks: 1455930
Attached patch merge-glyphs-rollup.patch (obsolete) — Splinter Review
Here's a work-in-progress patch set that I've been working on. It should mostly work, the last thing remaining is to compare the Patterns when merging FillGlyph commands. Unfortunately it looks like that will need to be a deep comparison to be accurate.
The default implementation falls back to stroking a path. It'd be better to just pass the draw command on to destination target(s), in the case they implement a faster version.
Attachment #8998973 - Attachment is obsolete: true
I've polished the patches up a little bit more. The basic idea here is two parts. 1. Stop producing a clip draw command around each text display item 2. Merge FillGlyph commands with compatible parameters Without (1), (2) is of limited usefulness. The tricky part is (1). To my knowledge, that clip was added to allow DrawTargetTiled to cull out FillGlyph commands to only the tiles that need the command, and not for correctness. So I wrote a commit that instead adds a 'bounds hint' parameter to FillGlyphs to do the same thing.
Attachment #9000153 - Flags: review?(bas)
Attachment #9000154 - Flags: review?(lsalzman)
Attachment #9000155 - Flags: review?(bas)
Attachment #9000156 - Flags: review?(bas)
How does this affect performance on D2D?
(In reply to Bas Schouten (:bas.schouten) from comment #7) > How does this affect performance on D2D? I don't see any significant difference from a talos run [1]. [1] https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=130bb81b5f4f&newProject=try&newRevision=7ee15f1064f139c0efbccdf4846a7243c152e60c&framework=1&filter=windows10
Comment on attachment 9000154 [details] Bug 1480801 - Update text painting to use dirty rect as bounds hint. Lee Salzman [:lsalzman] has approved the revision.
Attachment #9000154 - Flags: review+
Attachment #9000154 - Flags: review?(lsalzman) → review+
Comment on attachment 9000153 [details] Bug 1480801 - Add bounds hint to FillGlyphs and StrokeGlyphs. Bas Schouten (:bas.schouten) has approved the revision.
Attachment #9000153 - Flags: review+
Comment on attachment 9000155 [details] Bug 1480801 - Merge consecutive FillGlyphs commands with compatible parameters. Bas Schouten (:bas.schouten) has approved the revision.
Attachment #9000155 - Flags: review+
Comment on attachment 9000156 [details] Bug 1480801 - Add implementations of StrokeGlyphs to DrawTargetDual and DrawTargetTiled. Bas Schouten (:bas.schouten) has approved the revision.
Attachment #9000156 - Flags: review+
Attachment #9000153 - Flags: review?(bas)
Attachment #9000155 - Flags: review?(bas)
Attachment #9000156 - Flags: review?(bas)
Comment on attachment 9000153 [details] Bug 1480801 - Add bounds hint to FillGlyphs and StrokeGlyphs. Bas Schouten (:bas.schouten) has been removed from the revision.
Attachment #9000153 - Flags: review+
Severity: normal → S3
Assignee: rhunt → nobody

Bas, is this bug and the patches still relevant?

Flags: needinfo?(bas)

I don't think it is. Closing.

Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(bas)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: