mirror of https://github.com/yshui/picom.git
backend: gl: implement root_change interface for glx & egl
Co-authored-by: Monsterovich <Monsterovich@gmail.com> Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
9ac5166622
commit
fef7ff8815
|
@ -366,6 +366,7 @@ static void egl_diagnostics(backend_t *base) {
|
||||||
struct backend_operations egl_ops = {
|
struct backend_operations egl_ops = {
|
||||||
.init = egl_init,
|
.init = egl_init,
|
||||||
.deinit = egl_deinit,
|
.deinit = egl_deinit,
|
||||||
|
.root_change = gl_root_change,
|
||||||
.bind_pixmap = egl_bind_pixmap,
|
.bind_pixmap = egl_bind_pixmap,
|
||||||
.release_image = gl_release_image,
|
.release_image = gl_release_image,
|
||||||
.prepare = gl_prepare,
|
.prepare = gl_prepare,
|
||||||
|
|
|
@ -621,6 +621,11 @@ static bool gl_win_shader_from_stringv(const char **vshader_strv,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gl_root_change(backend_t *base, session_t *ps) {
|
||||||
|
auto gd = (struct gl_data *)base;
|
||||||
|
gl_resize(gd, ps->root_width, ps->root_height);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback to run on root window size change.
|
* Callback to run on root window size change.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -153,6 +153,8 @@ bool gl_last_render_time(backend_t *backend_data, struct timespec *time);
|
||||||
void gl_compose(backend_t *, image_handle image, coord_t image_dst, image_handle mask,
|
void gl_compose(backend_t *, image_handle image, coord_t image_dst, image_handle mask,
|
||||||
coord_t mask_dst, const region_t *reg_tgt, const region_t *reg_visible);
|
coord_t mask_dst, const region_t *reg_tgt, const region_t *reg_visible);
|
||||||
|
|
||||||
|
void gl_root_change(backend_t *base, session_t *);
|
||||||
|
|
||||||
void gl_resize(struct gl_data *, int width, int height);
|
void gl_resize(struct gl_data *, int width, int height);
|
||||||
|
|
||||||
bool gl_init(struct gl_data *gd, session_t *);
|
bool gl_init(struct gl_data *gd, session_t *);
|
||||||
|
|
|
@ -547,6 +547,7 @@ static void glx_diagnostics(backend_t *base) {
|
||||||
struct backend_operations glx_ops = {
|
struct backend_operations glx_ops = {
|
||||||
.init = glx_init,
|
.init = glx_init,
|
||||||
.deinit = glx_deinit,
|
.deinit = glx_deinit,
|
||||||
|
.root_change = gl_root_change,
|
||||||
.bind_pixmap = glx_bind_pixmap,
|
.bind_pixmap = glx_bind_pixmap,
|
||||||
.release_image = gl_release_image,
|
.release_image = gl_release_image,
|
||||||
.prepare = gl_prepare,
|
.prepare = gl_prepare,
|
||||||
|
|
Loading…
Reference in New Issue