aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/output.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/output.h')
-rw-r--r--include/sway/output.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/sway/output.h b/include/sway/output.h
index 04202976..b397c8e2 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -65,6 +65,12 @@ struct sway_output_non_desktop {
65 struct wl_listener destroy; 65 struct wl_listener destroy;
66}; 66};
67 67
68struct render_context {
69 struct sway_output *output;
70 struct wlr_renderer *renderer;
71 const pixman_region32_t *output_damage;
72};
73
68struct sway_output *output_create(struct wlr_output *wlr_output); 74struct sway_output *output_create(struct wlr_output *wlr_output);
69 75
70void output_destroy(struct sway_output *output); 76void output_destroy(struct sway_output *output);
@@ -115,7 +121,7 @@ bool output_has_opaque_overlay_layer_surface(struct sway_output *output);
115 121
116struct sway_workspace *output_get_active_workspace(struct sway_output *output); 122struct sway_workspace *output_get_active_workspace(struct sway_output *output);
117 123
118void output_render(struct sway_output *output, pixman_region32_t *damage); 124void output_render(struct render_context *ctx);
119 125
120void output_surface_for_each_surface(struct sway_output *output, 126void output_surface_for_each_surface(struct sway_output *output,
121 struct wlr_surface *surface, double ox, double oy, 127 struct wlr_surface *surface, double ox, double oy,
@@ -168,8 +174,7 @@ void output_get_box(struct sway_output *output, struct wlr_box *box);
168enum sway_container_layout output_get_default_layout( 174enum sway_container_layout output_get_default_layout(
169 struct sway_output *output); 175 struct sway_output *output);
170 176
171void render_rect(struct sway_output *output, 177void render_rect(struct render_context *ctx, const struct wlr_box *_box,
172 const pixman_region32_t *output_damage, const struct wlr_box *_box,
173 float color[static 4]); 178 float color[static 4]);
174 179
175void premultiply_alpha(float color[4], float opacity); 180void premultiply_alpha(float color[4], float opacity);