diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-06-26 18:33:42 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-08-16 18:37:55 +0200 |
commit | f1ba70ffa6f32bcdc5ab8f8c226a28c2c394d631 (patch) | |
tree | 3a219b30ed1ada48f14889d4aefe0108eb3363f2 | |
parent | 8f0d4c93323bb909ca71d1e441de5fee1efbc7b3 (diff) |
wlr_output: Make wlr_output_update_{custom,}_mode private
Backends should be using wlr_output_send_request_state to request
modesets to the compositor. This will be inlined and removed next commit.
-rw-r--r-- | include/wlr/interfaces/wlr_output.h | 16 | ||||
-rw-r--r-- | types/output/output.c | 24 |
2 files changed, 12 insertions, 28 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index 42374328..2d8cd833 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -104,22 +104,6 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend, const struct wlr_output_impl *impl, struct wl_display *display, const struct wlr_output_state *state); /** - * Update the current output mode. - * - * The backend must call this function when the mode is updated to notify - * compositors about the change. - */ -void wlr_output_update_mode(struct wlr_output *output, - struct wlr_output_mode *mode); -/** - * Update the current output custom mode. - * - * The backend must call this function when the mode is updated to notify - * compositors about the change. - */ -void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width, - int32_t height, int32_t refresh); -/** * Update the current output status. * * The backend must call this function when the status is updated to notify diff --git a/types/output/output.c b/types/output/output.c index b92d482b..38f19e3a 100644 --- a/types/output/output.c +++ b/types/output/output.c @@ -224,18 +224,7 @@ void wlr_output_set_custom_mode(struct wlr_output *output, int32_t width, wlr_output_state_set_custom_mode(&output->pending, width, height, refresh); } -void wlr_output_update_mode(struct wlr_output *output, - struct wlr_output_mode *mode) { - output->current_mode = mode; - if (mode != NULL) { - wlr_output_update_custom_mode(output, mode->width, mode->height, - mode->refresh); - } else { - wlr_output_update_custom_mode(output, 0, 0, 0); - } -} - -void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width, +static void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width, int32_t height, int32_t refresh) { if (output->width == width && output->height == height && output->refresh == refresh) { @@ -262,6 +251,17 @@ void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width, wlr_output_schedule_done(output); } +static void wlr_output_update_mode(struct wlr_output *output, + struct wlr_output_mode *mode) { + output->current_mode = mode; + if (mode != NULL) { + wlr_output_update_custom_mode(output, mode->width, mode->height, + mode->refresh); + } else { + wlr_output_update_custom_mode(output, 0, 0, 0); + } +} + void wlr_output_set_transform(struct wlr_output *output, enum wl_output_transform transform) { wlr_output_state_set_transform(&output->pending, transform); |