[cairo] [PATCH] Fix fixup_unbounded_boxes() to work even if the box is smaller than the extents

Jeff Muizelaar jeff at infidigm.net
Wed Aug 17 20:18:46 PDT 2011


On 11-08-17 5:40 PM, Chris Wilson wrote:
> On Wed, 17 Aug 2011 17:14:24 -0400, Jeff Muizelaar<jeff at infidigm.net>  wrote:
>> This patch fixes the problem we ran into here:
>> https://bugzilla.mozilla.org/show_bug.cgi?id=668921
>>
>> Currently fixup_unbounded_boxes assumes that the extents are tight when
>> we only have one box. This is not always true. e.g. when we tesselate boxes
>> we can end up with only one box which is smaller than the extents and
>> the extents are not updated.
>>
>> Does this look like the correct fix?
> No, that only helps with the immediate bug, but the situation can still
> arise if the tessellator reduces many boxes down to 2+, which due to
> some fluke of winding or malice is smaller than the initial extents.
I don't understand. The code in fixup_unbounded_boxes() seems to handle 
the case
of 2+ boxes that are smaller than the initial extents just fine.
> The approach taken on other paths is to correct the extents once we have
> an accurate bounds.
There's only one caller of _cairo_image_surface_fixup_unbounded_boxes. 
What other paths do you mean?

-Jeff


More information about the cairo mailing list