forked from external/yambar
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:
parent
95385863ae
commit
c11fee4ce3
24 changed files with 162 additions and 141 deletions
|
@ -29,7 +29,7 @@ particle_default_destroy(struct particle *particle)
|
|||
struct particle *
|
||||
particle_common_new(int left_margin, int right_margin,
|
||||
const char *on_click_template,
|
||||
struct font *font, struct rgba foreground,
|
||||
struct font *font, pixman_color_t foreground,
|
||||
struct deco *deco)
|
||||
{
|
||||
struct particle *p = calloc(1, sizeof(*p));
|
||||
|
@ -52,11 +52,11 @@ exposable_default_destroy(struct exposable *exposable)
|
|||
|
||||
void
|
||||
exposable_render_deco(const struct exposable *exposable,
|
||||
cairo_t *cr, int x, int y, int height)
|
||||
pixman_image_t *pix, int x, int y, int height)
|
||||
{
|
||||
const struct deco *deco = exposable->particle->deco;
|
||||
if (deco != NULL)
|
||||
deco->expose(deco, cr, x, y, exposable->width, height);
|
||||
deco->expose(deco, pix, x, y, exposable->width, height);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue