[cairo] Porting GTK+ to use Cairo

Jost Boekemeier jost2345 at yahoo.de
Wed May 12 10:16:31 PDT 2004


> The obvious problem here is that Cairo is just a rendering library; it
> doesn't do window management, it doesn't do events. GTK+ needs to be
> on top of a windowing system.

I've assumed that we do _not_ want to maintain state on the server-side.
Client-side rendering is not the question, rather to what extend can we
delegate the rendering work to Cairo?

For example cairo rendering of 1000 layers sitting on top of each other
seems to be quite slow; cairo sends everything, even the non-visible
parts, to the server. Does cairo expect that we use layers only when
stricly necessary (layer is not opaque) or can we assume that a future
version of cairo can optimize the picture before it is sent to the
server?


>  Or you could implement your own windowing server

I think this would be a completely different beast. 
I guess the Mozilla people understand this very well, they already have
a "widget server" which accepts XUL documents.  What are currently
missing are first class graphics objects.  I think adding cairo graphics
elements to XUL would be a good idea.  Their syntax could be similar to
SVG's notation, or one could clone the relevant part from Avalon...


> Trying to run a widget toolkit over a 9600 baud connection is going to
> be iffy at the best of times. 

Not really. In this environment a VNC picture would be 640x480*8=300K,
compressed ca 3K..30K which can be send in 3..30 seconds.  
I don't know where cairo pictures fit in there, I hope they are usually
10 times smaller than VNC images.


> Note that if you only put toplevel windows on the server, you need to
> send all the motion events all the time. 

Without maintaining a list on the server side that assoc's regions with
pointer shapes this will require a trip back to the server. When the
cursor shape "runs" e.g. 200ms behind the mouse position, I think it
will be very difficult for the customer to find a hot-spot.







More information about the cairo mailing list