[cairo] pixman?

Thomas Stover thomas at wsinnovations.com
Tue Jul 15 12:10:46 PDT 2008


Thanks for the info. I misread before, now I see. Cairo uses xrender on 
the xlib back end. Which apparently isn't always available, so it needs 
a software fall back - implemented via pixman.

Sorry for combining too many stray thoughts at once. The other thing I 
was asking was if what I have been doing is the appropriate technique to 
use for adding raster graphics to cairo. That is:

1) do vector graphics as usual with cairo
2) create an image surface over on the side
3) get the raw raster buffer with cairo_image_surface_get_data()
4) add raster graphics to that buffer
5) use cairo_set_source_surface() to paint the temporary image source 
with the raster graphics in to the origional


Soeren Sandmann wrote:
> Thomas Stover <thomas at wsinnovations.com> writes:
>
>   
>> So what you are saying is - don't use it?
>>     
>
> Basically, yes. Much, though not all, of its functionality is
> available through cairo already.
>
> At some point I think it may make sense to make pixman a
> general-purpose low-level painting library, but there is a bit of
> historical cruft in it that we need to get rid of first.
>
>   
>> So I am also to understand
>> that with cairo, pixel level manipulation should be done exclusively
>> by manipulating buffers returned by cairo_image_surface_get_data()?
>> (not that it is a problem) One more for the curious George - so what
>> this does is utilize X Render for accelerating certain surface
>> operations on xlib / xcb back ends? Is this information that users of
>> the cairo api at the front door need to take into consideration, or is
>> this something we can just not worry about?
>>     
>
> I'm no sure what you are asking here. The cairo xlib/xcb backends will
> use the X RENDER extension which may or may not be hardware
> accelerated.
>
> The performance of the X backends is currently essentially
> unpredictable. It varies from unusably slow to very fast, depending on
> the combination of server, driver and hardware you will be using.
>
> The image backend has predictable and usually acceptable performance,
> but it is not hardware accelerated.
>
>
> Soren
>   



More information about the cairo mailing list