[cairo] Inefficiency of _cairo_xlib_surface_composite

Bill Spitzak spitzak at d2.com
Thu Jan 27 16:26:19 PST 2005



Jason Dorje Short wrote:

> - If the operation is OVER or SRC and there is a mask, but the mask is
> only 1-bit (all alpha values either 255 or 0), then XCopyArea can be
> used with a monochrome bitmap as a mask.

This is wrong if Cairo assumes images are premultiplied. It would only 
work if the rgb is 0 where the alpha is 0.

Second, I really doubt real applications are going to use 1-bit alpha 
enough to make it worth detecting this. I would limit the detection to 
determining if the alpha is 1 everywhere.



More information about the cairo mailing list