[cairo] using cairo's drm backend.

Karshan Sharma sharma34 at illinois.edu
Fri May 20 13:25:26 PDT 2011


Hi,

I'm new here so disregard this message if it is stupid :).

I'm trying to build  a simple program to use cairo's drm backend, just
to print a hello world on the screen. I basically just call
cairo_drm_device_default() to initialize a cairo_device_t* and then
call cairo_drm_surface_create() with that cairo_device_t*. But i'm
getting a segfault in cairo_drm_surface_create(), specifically in
intel_bo_create(). i think it has something to do with an
uninitialized cairo list, since the line:

cairo_list_entry_foreach(bo, intel_bo_t, &device->bo_in_flight, cache_list)
in (src/drm/cairo-drm-intel.c) is iterating over an empty list (i.e.
(&device->bo_in_flight)->next and ->prev are both NULL, as i saw when
i ran my code in gdb).

also i couldnt find any sample code that is using cairo's drm backend
thats why I began writing this... I'm probably missing something
obvious since i'm not familiar with cairo yet. so if anyone can help
me out that would be great.

also i'm using the cairo git version (1.11.3) as well as the
development pixman version from the git if that helps.

Thanks
Karshan


More information about the cairo mailing list