Closed Bug 1201937 Opened 9 years ago Closed 9 years ago

1143303-1.svg renders incorrectly in reftests with DrawTargetTiled enabled

Categories

(Core :: Graphics, defect)

41 Branch
All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: snorp, Assigned: lsalzman)

References

Details

(Whiteboard: gfx-noted)

Attachments

(1 file, 1 obsolete file)

I don't know why. It looks fine if I simply view it with Fennec.
Whiteboard: gfx-noted
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
The problem arises in DrawTargetTiled::Fill(), with respect to this reftest. The reftest draws a really small circle, small enough that it will not fit in cairo's fixed-point coordinate type without rounding down to 0.

So 0 bounds are what cairo_path_extents() returns to us, before we apply the transform that would scale it up to be large enough to span multiple tiles. But since the bounds are "empty", the transform can no longer help.

So when DrawTargetTiled is trying to get the path bounds, then determine which tiles intersect the path bounds, it sees the empty rectangle and decides the circle intersects no titles.

The only way around this is to push the transform onto the cairo context before we set the path on it, so that it is scaled up properly before it ever gets transformed to fixed point, which is what this patch to PathCairo does.
Attachment #8663156 - Flags: review?(matt.woodrow)
This bug might also be the cause of the issue noted in bug 1204076, so we should investigate if that is a dup...
See Also: → 1204076
Attachment #8663156 - Flags: review?(matt.woodrow) → review+
Revised version of the patch to properly handle stroke line widths.

Line widths are effectively interpreted in the space of the transform when we do bounds or contains queries, so the transform must still be active on the context at the time we do this. Thus, resetting the transform to identity was breaking stroke queries.

So, this version of the patch just keeps the parts of the original patch that set the transform, but removes the other parts that were resetting to identity space.
Attachment #8663156 - Attachment is obsolete: true
Attachment #8663757 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/cd3176041896
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: