Closed Bug 1082083 Opened 5 years ago Closed 5 years ago

fix a trivial inefficiency in vertical textrun drawing code

Categories

(Core :: Graphics: Text, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(1 file)

In the patches to draw vertical textruns with sideways glyph orientation, the parameters to the Translate() operation to adjust the baseline include a divide-by-two on a Point (for canvas rendering) or gfxPoint (for HTML content) whose X coordinate is known to always be zero. We should apply that division only to the Y coordinate.

(The compiler may have been smart enough to optimize this away anyhow, as the zero is a constant, but we should write it the sensible way just for tidiness.)
As well as being (in principle) more efficient, this is also more correct: we have no business touching the x-coordinate when we only want to adjust the baseline.
Attachment #8504195 - Flags: review?(jdaggett)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8504195 - Flags: review?(jdaggett) → review+
https://hg.mozilla.org/mozilla-central/rev/12c7a993e3ad
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.