[cairo] [PATCH] tessellator: Fix boxes tessellator to handle num_boxes <= 1 correctly

Taekyun Kim podain77 at gmail.com
Tue Jun 7 22:16:52 PDT 2011

Hi all,

It looks like that _cairo_bentley_ottmann_tessellate_boxes() does not handle
zero or single box input correctly.

I think clearing 'out' when 'in->num_boxes == 0' would be more correct
rather than just returning CAIRO_STATUS_SUCCESS because we cannot assume
that 'out' is already empty and 'in' and 'out' might be equal.

For a single box input, we should copy 'in' to 'out'. I assumed that
cairo_boxes_t have no empty chunk if it has at least a box (therefore the
first box is at boxes->chunks.base[0]). May I have this assumption though?

Please review my patch and leave some comments.

Best Regards,
Taekyun Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110608/ee0fe29d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tessellator-Fix-boxes-tessellator-to-handle-num_boxe.patch
Type: text/x-patch
Size: 1436 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110608/ee0fe29d/attachment.bin>

More information about the cairo mailing list