mirror of https://github.com/yshui/picom.git
backend: gl: inherit image's inner properties in the gl_image_decouple function
Image decouple should keep all the image properies from the source image, so shader must be copied. And there are also some internal properties what should be inherited but wasn't. In particular this prevents images from losing their shaders when alpha is applied. Fixes #1174
This commit is contained in:
parent
bbc657e4bc
commit
eb39426b08
|
@ -1013,9 +1013,11 @@ static inline void gl_image_decouple(backend_t *base, struct backend_image *img)
|
|||
auto new_tex = ccalloc(1, struct gl_texture);
|
||||
|
||||
new_tex->texture = gl_new_texture(GL_TEXTURE_2D);
|
||||
new_tex->y_inverted = true;
|
||||
new_tex->y_inverted = inner->y_inverted;
|
||||
new_tex->has_alpha = inner->has_alpha;
|
||||
new_tex->height = inner->height;
|
||||
new_tex->width = inner->width;
|
||||
new_tex->shader = inner->shader;
|
||||
new_tex->refcount = 1;
|
||||
new_tex->user_data = gd->decouple_texture_user_data(base, inner->user_data);
|
||||
|
||||
|
|
Loading…
Reference in New Issue