[cairo] Re: Notes on cairo/win32

Owen Taylor otaylor at redhat.com
Wed Jan 12 06:00:36 PST 2005


On Wed, 2005-01-12 at 02:02 -0500, Dimitrie O. Paun wrote:
> > 2. Implement it on top of GDI+. The GDI+ model is somewhat richer
> >    than the GDI model... it adds antialiased primitives, and "Over"
> >    compositing of those primitives, though considerable amounts of
> >    the Cairo API would have to be done manually.
> 
> Speaking of which, being able to implement GDI+ on top of Cairo
> easily and efficiently could be very helpful to Wine (http://winehq.org).
> 
> From my 10,000 foot view, it looks like Cairo has a more powerful
> model then GDI+, but it's good to keep this in mind, especially
> given the track record for Microsoft for throwing weird stuff in
> their interfaces.

The main things in GDI+ not in Cairo are:

 - Gamma-corrected alpha compositing. Probably the biggest problem,
   because compositing a partially transparent primitive with/without
   gamma-correction can give quite substantially different colors

 - Not-antialiased primitives. Hard to implement on top of Cairo,
   but in most cases, people will be happy with everything smoothed.
   The tricky bit is getting rectangles and horizontal/vertical 
   lines to be sharp. In GDI+, people may turn off antialiasing
   then be careless with where they draw primitives and expect them
   to be sharp.

 - Image effects. Should be pretty easy to implement manually.

> Currently Wine uses Xlib to implement GDI, and that works well most
> of the time, with DIBs being the notable exception. These are a very
> popular feature that we need to support well. 
> 
> Theoretically, we would need a software renderer to implement them
> properly, but that's a lot of work, and we don't have the resources 
> to do it currently. So we have to play all sorts of silly games with 
> the X server, bouncing the image back an forth (GDI operations must 
> coherently modify the DIB with any direct memory modification 
> performed by the application). This is both rather nasty and slow.

Doesn't the need for apps to use GdiFlush() help in reducing
synchronization with the server? But yes, consistent rendering between
client and server is a nice feature of Cairo.

Regards,
					Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050112/bc0b477c/attachment.pgp


More information about the cairo mailing list