bar: don't use cairo

This is trivial in the Wayland backend; just instantiate a pixman
pointing to the same mmapped memory as the wayland buffer.

In the XCB backend, we change the implementation slightly; instead of
rendering via a cairo XCB surface backend (to a server side pixmap),
which is then blitted to the window in commit(), we now render to a
client-side pixman pixmap, and blit it using xcb_put_image() in
commit().
This commit is contained in:
Daniel Eklöf 2019-09-22 11:46:46 +02:00
parent c11fee4ce3
commit 01e71590e0
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 58 additions and 156 deletions

View file

@ -11,8 +11,7 @@ struct backend {
void (*expose)(const struct bar *bar),
void (*on_mouse)(struct bar *bar, enum mouse_event event,
int x, int y));
pixman_image_t *(*get_pixman_image)(const struct bar *bar);
void (*commit_pixman)(const struct bar *bar, pixman_image_t *pix);
void (*commit)(const struct bar *bar);
void (*refresh)(const struct bar *bar);
void (*set_cursor)(struct bar *bar, const char *cursor);
};