forked from external/yambar
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:
parent
c11fee4ce3
commit
01e71590e0
5 changed files with 58 additions and 156 deletions
|
@ -1,8 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <cairo.h>
|
||||
#include <cairo-xcb.h>
|
||||
|
||||
#include "../bar/bar.h"
|
||||
#include "backend.h"
|
||||
|
||||
|
@ -46,22 +43,10 @@ struct private {
|
|||
/* Name of currently active cursor */
|
||||
char *cursor_name;
|
||||
|
||||
cairo_t *cairo;
|
||||
cairo_surface_t *cairo_surface;
|
||||
pixman_image_t *pix;
|
||||
|
||||
struct {
|
||||
void *data;
|
||||
const struct backend *iface;
|
||||
} backend;
|
||||
#if 0
|
||||
/* Backend specifics */
|
||||
xcb_connection_t *conn;
|
||||
|
||||
xcb_window_t win;
|
||||
xcb_colormap_t colormap;
|
||||
xcb_pixmap_t pixmap;
|
||||
xcb_gc_t gc;
|
||||
xcb_cursor_context_t *cursor_ctx;
|
||||
xcb_cursor_t cursor;
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue