diff options
author | Reza Jelveh <[email protected]> | 2024-04-15 13:39:41 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-15 01:39:41 -0400 |
commit | fb86ed6b0588dfdebfb66ce875bc63cfa0a897f6 (patch) | |
tree | 29857a1769107adc58696f08d379f608aa4e29a2 /sway/desktop/fx_renderer/fx_texture.c | |
parent | a5e79676c4bd22fc5902182acf0667907202a465 (diff) |
feat: 1.9 merge (#277)
Co-authored-by: William McKinnon <[email protected]>
Co-authored-by: Erik Reider <[email protected]>
Diffstat (limited to 'sway/desktop/fx_renderer/fx_texture.c')
-rw-r--r-- | sway/desktop/fx_renderer/fx_texture.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/sway/desktop/fx_renderer/fx_texture.c b/sway/desktop/fx_renderer/fx_texture.c deleted file mode 100644 index cc5d14c8..00000000 --- a/sway/desktop/fx_renderer/fx_texture.c +++ /dev/null @@ -1,37 +0,0 @@ -#include <assert.h> -#include <wlr/render/gles2.h> - -#include "sway/desktop/fx_renderer/fx_texture.h" - -struct fx_texture fx_texture_create() { - return (struct fx_texture) { - .id = 0, - .target = 0, - .width = -1, - .height = -1, - }; -} - -struct fx_texture fx_texture_from_wlr_texture(struct wlr_texture *texture) { - assert(wlr_texture_is_gles2(texture)); - - struct wlr_gles2_texture_attribs texture_attrs; - wlr_gles2_texture_get_attribs(texture, &texture_attrs); - - return (struct fx_texture) { - .target = texture_attrs.target, - .id = texture_attrs.tex, - .has_alpha = texture_attrs.has_alpha, - .width = texture->width, - .height = texture->height, - }; -} - -void fx_texture_release(struct fx_texture *texture) { - if (texture->id) { - glDeleteTextures(1, &texture->id); - } - texture->id = 0; - texture->width = -1; - texture->height = -1; -} |