cairo: replace cairo with pixman in decos, particles and modules

All decoration, particle and module interfaces now takes a
pixman_image_t parameter, and all drawing is done using pixman APIs.

The wayland/xcb backends implement a new interface functions,
get_pixman_image(), that should return a pixman image instance that is
suitable for rendering.

In the wayland backend, the image uses the same backing data as the
cairo surface.

In the XCB backend, we create a new image each time, and then blit it
to the cairo surface at commit time.
This commit is contained in:
Daniel Eklöf 2019-09-22 01:56:58 +02:00
parent 95385863ae
commit c11fee4ce3
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
24 changed files with 162 additions and 141 deletions

View file

@ -49,7 +49,7 @@ dynlist_begin_expose(struct exposable *exposable)
}
static void
dynlist_expose(const struct exposable *exposable, cairo_t *cr, int x, int y, int height)
dynlist_expose(const struct exposable *exposable, pixman_image_t *pix, int x, int y, int height)
{
const struct private *e = exposable->private;
@ -60,7 +60,7 @@ dynlist_expose(const struct exposable *exposable, cairo_t *cr, int x, int y, int
for (size_t i = 0; i < e->count; i++) {
const struct exposable *ee = e->exposables[i];
ee->expose(ee, cr, x + left_spacing, y, height);
ee->expose(ee, pix, x + left_spacing, y, height);
x += left_spacing + e->widths[i] + right_spacing;
}
}