Use functions in backend/backend_common.c

Build backend_common.c even when new_backend=false.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-01-01 11:01:47 +00:00
parent 4aeffa36b8
commit 3686bf7a33
4 changed files with 10 additions and 171 deletions

View File

@ -46,9 +46,8 @@ solid_picture(session_t *ps, bool argb, double a, double r, double g, double b)
return picture;
}
static xcb_image_t *
make_shadow(xcb_connection_t *c, const conv *kernel, const double *shadow_sum,
double opacity, int width, int height) {
xcb_image_t *make_shadow(xcb_connection_t *c, const conv *kernel,
const double *shadow_sum, double opacity, int width, int height) {
/*
* We classify shadows into 4 kinds of regions
* r = shadow radius

View File

@ -1,6 +1,6 @@
#pragma once
#include <xcb/xcb_image.h>
#include <xcb/render.h>
#include <xcb/xcb_image.h>
#include <stdbool.h>
@ -8,6 +8,7 @@
typedef struct session session_t;
typedef struct win win;
typedef struct conv conv;
bool build_shadow(session_t *ps, double opacity, const int width, const int height,
xcb_render_picture_t shadow_pixel, xcb_pixmap_t *pixmap,
@ -17,3 +18,6 @@ xcb_render_picture_t
solid_picture(session_t *ps, bool argb, double a, double r, double g, double b);
void paint_all_new(session_t *ps, region_t *region, win *const t);
xcb_image_t *make_shadow(xcb_connection_t *c, const conv *kernel,
const double *shadow_sum, double opacity, int width, int height);

View File

@ -1,7 +1,7 @@
# enable xrender
srcs += [ files('backend_common.c') ]
if get_option('new_backends')
srcs += [ files('xrender.c', 'backend.c', 'backend_common.c') ]
srcs += [ files('xrender.c', 'backend.c') ]
# enable opengl
if get_option('opengl')