[cairo] Does Cairo have software-surfaces?

Carl Worth cworth at cworth.org
Mon Mar 28 04:38:23 PST 2005


On Sun, 27 Mar 2005 21:39:08 +0200, Linuxhippy wrote:
> I am quite new to Cairo and I think its an rather interresting library, 
> quite cool ;-)

I'm very happy that you've come to play. I hope you have fun.

> I have only delt toll now with the Java2D library which is also quite 
> powerful (and FAST!!) and it has so-calles BufferedImages which I would 
> need for my next project, which are surfaces in system-memory which can 
> be accerlated in VRAM under some circumstances, but act from the 
> programmer's point of view like any other surface (e.g. all drawing 
> methods, blits etc. are possible).
> 
> Is this also possible with cairo, and how can I do this?

To get "surfaces in system-memory", you'll want a cairo image surface,
so see cairo_set_target_image or cairo_image_surface_create_for_data.
Those calls allow you to draw to data which exists in your own address
space so that you can do anything you'd like with the contents.

As for surfaces that "act like any other surface" and where "all
drawing methods are possible", those statements should apply to any of
the cairo surface types.

As for "accelerated in VRAM under some circumstances", I'm not sure
exactly what you have in mind there. But, for now, all drawing
operations for image surfaces are all-software. And then, that
software is not fully optimized yet, but much of what is needed there
is understood and being worked on, (though more volunteer help would
always be appreciated).

I hope that helps answer your questions, but if not, please feel free
to ask in more detail.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050328/a4028ab9/attachment.pgp


More information about the cairo mailing list