[cairo] CAIRO_OPERATOR_SOURCE not handled by backend
jeff at infidigm.net
Tue Mar 20 10:49:37 PDT 2007
On Tue, Mar 20, 2007 at 06:35:58PM +0100, Sebastian Tusk wrote:
> I am writing a surface backend and noticed that for CAIRO_OPERATOR_SOURCE there is some special handling in _clip_and_composite. I'd like to implement this operator in my backend as all the other operators. Is it necessary to change _clip_and_composite or is there another solution?
The reason for the special behaviour is that when SOURCE or CLEAR are used with
a mask in cairo that mask bounds the operation. Does your backend
support this behaviour? Either way _clip_and_composite should probably
be changed to try to do the operation and the backends that don't
support it should return STATUS_UNSUPPORTED. Only then, should cairo
fallback to trying (src IN mask IN clip) ADD (dst OUT (mask IN clip)).
> Shouldn't most backends be able to do the SOURCE operator more efficently than the current way?
XRender can not. I am not sure about the other backends, though I think
Quartz (at least newer ones) might be able to do it more efficiently.
More information about the cairo