[cairo] Re: Notes on cairo/win32

Dimitrie O. Paun dpaun at rogers.com
Wed Jan 12 09:39:43 PST 2005


On Wed, Jan 12, 2005 at 09:00:36AM -0500, Owen Taylor wrote:
> On Wed, 2005-01-12 at 02:02 -0500, Dimitrie O. Paun wrote:
> 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

Yes, that's a bummer, and I'm afraid not having it in Cairo would
most likely mean Wine will have a sub-par graphics engine.

>  - 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.

The problem is that apps do all sort of strange things, and we
almost have to be pixel perfect. Any fundamental reason why
we can't programmatically turn off antialiasing in Cairo?
 
>  - Image effects. Should be pretty easy to implement manually.

Indeed.
 
> > 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.

Thing is that you don't have to do a GdiFlush or anything to
directly manipulate a DIB. You can just draw a line, change
some bytes in memory directly, draw something else, and it
should just work. To achieve that we trap any memory accesses
to the DIB, and copy the image back and forth from the server
on any such access. U-g-l-y.

-- 
Dimi.



More information about the cairo mailing list