[cairo] [PATCH] image: Bug fix for _cairo_image_surface_fixup_unbounded_boxes

Taekyun Kim podain77 at gmail.com
Tue Jun 7 22:44:26 PDT 2011


Here's an another patch for unbounded operation bug.

As I understand, unbounded operation should make it fully transparent where
mask is not allowed.

If we do composite via mask and the mask covers extents->bounded, we can use
_cairo_image_surface_fixup_unbounded() because pixman_image_composite32()
clears all the destination pixels where mask is not allowed.

But some fast paths do not use mask when geometry is aligned boxes, so some
areas will be remain unchanged rather than cleared though mask is not
allowed there.

And extents information is just an approximation (not tight bounding box).
So we may get non-zero-area extents->bounded even though there're no boxes
to render. Because _cairo_image_surface_fixup_unbounded() just clears area
between bounded and unbounded, we can get some areas uncleared. This is also
same for single box cases because extents->bounded and the input box might
not be the same area. So clearing area (boxes XOR extents->unbounded) is
also needed for these cases.

Maybe I'm missing something or there can be some better ways of handling
this.
So review and comments would be appreciated.

Thanks.
-- 
Best Regards,
Taekyun Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110608/e8b406e5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-image-Bug-fix-for-_cairo_image_surface_fixup_unbound.patch
Type: text/x-patch
Size: 1220 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110608/e8b406e5/attachment.bin>


More information about the cairo mailing list