[cairo] [PATCH 2/2] xlib-surface fix

Jeff Muizelaar jeff at infidigm.net
Fri Aug 5 08:17:58 PDT 2005

On Fri, Aug 05, 2005 at 06:43:16AM -0700, Carl Worth wrote:
> The patches look fine in general. Thanks!
> The one comment I have is that rather than buffer_diff and
> buffer_diff_noalpha it seems like it might be preferable to have the
> test code pass a cairo_format_t to the comparison function.

While I agree this is better in the long run. For now, I think it is
better to have buffer_diff and buffer_diff_noalpha because passing a
cairo_format_t gives the impression that buffer_diff supports comparing
any cairo_format_t which it does not. 

Alternatively we could just return an error on formats that we don't
currently support. However, this would require to change most of the
users of buffer_diff from 'if (!buffer_diff())' to 'if (buffer_diff() >
0)' which is uglier.

I prefer adding buffer_diff[_noalpha] with a comment describing what the
future interface should look like.


More information about the cairo mailing list