Closed Bug 524173 Opened 15 years ago Closed 13 years ago

Off-by-one bug in Cairo's rendering of some degenerate linear gradients

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: zwol, Unassigned)

References

Details

Attachments

(1 file)

Attached patch test case patchSplinter Review
While developing the tests for bug 513395, we discovered a bug in Cairo's rendering of some degenerate linear gradients -- that is, gradients with two or more stops at the same point.  I'm attaching a pair of new reftests which demonstrate the problem using <canvas>.  linear-gradient-1a.html passes on all platforms, but linear-gradient-1b.html passes only on Mac; on Windows and Linux, the boundary between the blue and the red boxes is one pixel below where it ought to be (that is, the blue box is 151px tall and the red box is 149px tall, when both should be 150px).

The problem seems to be a function of where along the gradient line the degenerate cluster appears.  1a has two stops at t=0, whereas 1b has two stops at t=1.  I've also been able to reproduce the problem with two stops at t=0.5 under some circumstances (not shown in this attachment).

Note that for tryserver purposes I marked 1b fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") in canvas/reftest.list, so don't be surprised if you run it and see no failures.
I believe this is fixed by the pixman update associated with bug 640250
Could you please include the test cases from this bug with your landing of the pixman update, then? (removing the fails-if, natch)
http://hg.mozilla.org/mozilla-central/rev/128c34e6c3b8
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Except the fails-if wasn't actually removed.  But, interestingly, the test passes on Lion.  This bug may be the same as bug 673333 given that it passes on Lion, and also the same as the two other failures so annotated in https://hg.mozilla.org/mozilla-central/rev/84117219ded0.
Bug 895135 seems to fix this.
Depends on: 895135
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: