summaryrefslogtreecommitdiff
path: root/include/sway/desktop/fx_renderer.h
diff options
context:
space:
mode:
authorWilliam McKinnon <[email protected]>2022-11-23 23:37:35 -0500
committerGitHub <[email protected]>2022-11-23 23:37:35 -0500
commit6951b8e4932b9cfc0f3f5f17ef53253a2850b841 (patch)
tree4d3d0d5c1e3ec73ced471bc0bc31aefe6668dc16 /include/sway/desktop/fx_renderer.h
parentd27c346b9e28d9748985ac54e960b650017f720a (diff)
render refactor: implement decoration_data struct (#61)
Diffstat (limited to 'include/sway/desktop/fx_renderer.h')
-rw-r--r--include/sway/desktop/fx_renderer.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/sway/desktop/fx_renderer.h b/include/sway/desktop/fx_renderer.h
index d1fd9a3f..05b4458d 100644
--- a/include/sway/desktop/fx_renderer.h
+++ b/include/sway/desktop/fx_renderer.h
@@ -7,6 +7,13 @@
enum corner_location { ALL, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT };
+struct decoration_data {
+ float alpha;
+ float saturation;
+ int corner_radius;
+ bool has_titlebar;
+};
+
struct gles2_tex_shader {
GLuint program;
GLint proj;
@@ -91,11 +98,10 @@ void fx_renderer_scissor(struct wlr_box *box);
bool fx_render_subtexture_with_matrix(struct fx_renderer *renderer, struct wlr_texture *wlr_texture,
const struct wlr_fbox *src_box, const struct wlr_box *dst_box, const float matrix[static 9],
- float alpha, int radius, float saturation, const bool has_titlebar);
+ struct decoration_data deco_data);
bool fx_render_texture_with_matrix(struct fx_renderer *renderer, struct wlr_texture *wlr_texture,
- const struct wlr_box *dst_box, const float matrix[static 9], float alpha, int radius, float saturation,
- const bool has_titlebar);
+ const struct wlr_box *dst_box, const float matrix[static 9], struct decoration_data deco_data);
void fx_render_rect(struct fx_renderer *renderer, const struct wlr_box *box,
const float color[static 4], const float projection[static 9]);