Closed Bug 573942 Opened 14 years ago Closed 14 years ago

Adjust gfxContext matrix components that are close to integers to be integers

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

References

Details

Attachments

(1 file)

Attached patch fixSplinter Review
We need this in PresShell::RenderDocument and maybe other places. Since canvas API parameters are in floats, if we render a document with scale factor 1.2 and internally everything's being scaled down by 1/1.2, converting 1.2 to a float and then dividing by 1.2 as a double doesn't give us 1, just something close to 1.

The attached patch fixes this by adding a NudgeCurrentMatrixToIntegers method on gfxContext (better name accepted with gratitude) which we call from PresShell::RenderDocument. This is needed to fix some reftest failures with the retained-layers patches.
Attachment #453337 - Flags: superreview?(vladimir)
Attachment #453337 - Flags: review?(jmuizelaar)
Attachment #453337 - Flags: review?(jmuizelaar) → review+
Comment on attachment 453337 [details] [diff] [review]
fix

Is "Nudge" really the right term? ;)
Attachment #453337 - Flags: superreview?(vladimir) → superreview+
Would this help with bug 520943?
Probably not, but it shouldn't hurt.
Whiteboard: [needs landing]
Actually I'll land this with bug 564991 since it conflicts with patches there.
Whiteboard: [needs landing]
Whiteboard: [needs landing]
http://hg.mozilla.org/mozilla-central/rev/df85fba385ca
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: