aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-10-24 12:58:45 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-11-11 23:11:17 +0000
commitfe4225d5dee51f21e0623fd1050af79918ff4718 (patch)
tree89ded32c86da0c4a35862ec70a6ffce72129415c
parent9e10e9af7f7d7013d81023c923216dadbe60c58f (diff)
output: constify damage APIs
-rw-r--r--include/wlr/types/wlr_output.h6
-rw-r--r--types/output/cursor.c2
-rw-r--r--types/output/output.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 9d146209..6b39cfc8 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -206,7 +206,7 @@ struct wlr_output {
struct wlr_output_event_damage {
struct wlr_output *output;
- pixman_region32_t *damage; // output-buffer-local coordinates
+ const pixman_region32_t *damage; // output-buffer-local coordinates
};
struct wlr_output_event_precommit {
@@ -421,7 +421,7 @@ uint32_t wlr_output_preferred_read_format(struct wlr_output *output);
* than what changed since last frame since multiple render buffers are used.
*/
void wlr_output_set_damage(struct wlr_output *output,
- pixman_region32_t *damage);
+ const pixman_region32_t *damage);
/**
* Test whether the pending output state would be accepted by the backend. If
* this function returns true, wlr_output_commit() can only fail due to a
@@ -492,7 +492,7 @@ void wlr_output_lock_software_cursors(struct wlr_output *output, bool lock);
* compositors render.
*/
void wlr_output_render_software_cursors(struct wlr_output *output,
- pixman_region32_t *damage);
+ const pixman_region32_t *damage);
/**
* Get the set of DRM formats suitable for the primary buffer, assuming a
* buffer with the specified capabilities.
diff --git a/types/output/cursor.c b/types/output/cursor.c
index b4eb55af..41d99c12 100644
--- a/types/output/cursor.c
+++ b/types/output/cursor.c
@@ -129,7 +129,7 @@ surface_damage_finish:
}
void wlr_output_render_software_cursors(struct wlr_output *output,
- pixman_region32_t *damage) {
+ const pixman_region32_t *damage) {
int width, height;
wlr_output_transformed_resolution(output, &width, &height);
diff --git a/types/output/output.c b/types/output/output.c
index 9a2e5515..ab10286b 100644
--- a/types/output/output.c
+++ b/types/output/output.c
@@ -481,7 +481,7 @@ static void output_state_clear_buffer(struct wlr_output_state *state) {
}
void wlr_output_set_damage(struct wlr_output *output,
- pixman_region32_t *damage) {
+ const pixman_region32_t *damage) {
pixman_region32_intersect_rect(&output->pending.damage, damage,
0, 0, output->width, output->height);
output->pending.committed |= WLR_OUTPUT_STATE_DAMAGE;