diff options
author | Simon Ser <contact@emersion.fr> | 2021-07-12 18:01:40 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-07-29 09:48:33 -0400 |
commit | 3132c0ab107d0251652fe1cb43830d5d0cc57e8f (patch) | |
tree | 54208a9720aa82098ba3c84ff4606c4acac68b8e | |
parent | f211bc983aeeacd7f4d6af8c47845e8ddc2f7e9b (diff) |
output: drop wlr_output_state.buffer_type
This is now unconditionally set to WLR_OUTPUT_STATE_BUFFER_SCANOUT.
-rw-r--r-- | backend/drm/drm.c | 1 | ||||
-rw-r--r-- | backend/wayland/output.c | 4 | ||||
-rw-r--r-- | backend/x11/output.c | 3 | ||||
-rw-r--r-- | include/wlr/types/wlr_output.h | 8 | ||||
-rw-r--r-- | types/wlr_output.c | 4 | ||||
-rw-r--r-- | types/wlr_output_damage.c | 3 |
6 files changed, 3 insertions, 20 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index ed301b25..e7628e2d 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -396,7 +396,6 @@ static bool drm_connector_set_pending_fb(struct wlr_drm_connector *conn, struct wlr_drm_plane *plane = crtc->primary; assert(state->committed & WLR_OUTPUT_STATE_BUFFER); - assert(state->buffer_type == WLR_OUTPUT_STATE_BUFFER_SCANOUT); struct wlr_buffer *local_buf; if (drm->parent) { diff --git a/backend/wayland/output.c b/backend/wayland/output.c index d0f5f6dd..16eb17f5 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -261,7 +261,6 @@ static bool output_test(struct wlr_output *wlr_output) { } if ((wlr_output->pending.committed & WLR_OUTPUT_STATE_BUFFER) && - wlr_output->pending.buffer_type == WLR_OUTPUT_STATE_BUFFER_SCANOUT && !test_buffer(output->backend, wlr_output->pending.buffer)) { return false; } @@ -287,9 +286,6 @@ static bool output_commit(struct wlr_output *wlr_output) { } if (wlr_output->pending.committed & WLR_OUTPUT_STATE_BUFFER) { - assert(wlr_output->pending.buffer_type == - WLR_OUTPUT_STATE_BUFFER_SCANOUT); - struct wp_presentation_feedback *wp_feedback = NULL; if (output->backend->presentation != NULL) { wp_feedback = wp_presentation_feedback(output->backend->presentation, diff --git a/backend/x11/output.c b/backend/x11/output.c index 44219dde..2f996c10 100644 --- a/backend/x11/output.c +++ b/backend/x11/output.c @@ -257,9 +257,6 @@ static struct wlr_x11_buffer *get_or_create_x11_buffer( static bool output_commit_buffer(struct wlr_x11_output *output) { struct wlr_x11_backend *x11 = output->x11; - assert(output->wlr_output.pending.buffer_type == - WLR_OUTPUT_STATE_BUFFER_SCANOUT); - struct wlr_buffer *buffer = output->wlr_output.pending.buffer; struct wlr_x11_buffer *x11_buffer = get_or_create_x11_buffer(output, buffer); diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index f42e2061..dd4b4c0f 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -63,11 +63,6 @@ enum wlr_output_state_field { WLR_OUTPUT_STATE_GAMMA_LUT = 1 << 7, }; -enum wlr_output_state_buffer_type { - WLR_OUTPUT_STATE_BUFFER_RENDER, - WLR_OUTPUT_STATE_BUFFER_SCANOUT, -}; - enum wlr_output_state_mode_type { WLR_OUTPUT_STATE_MODE_FIXED, WLR_OUTPUT_STATE_MODE_CUSTOM, @@ -85,8 +80,7 @@ struct wlr_output_state { bool adaptive_sync_enabled; // only valid if WLR_OUTPUT_STATE_BUFFER - enum wlr_output_state_buffer_type buffer_type; - struct wlr_buffer *buffer; // if WLR_OUTPUT_STATE_BUFFER_SCANOUT + struct wlr_buffer *buffer; // only valid if WLR_OUTPUT_STATE_MODE enum wlr_output_state_mode_type mode_type; diff --git a/types/wlr_output.c b/types/wlr_output.c index d31d0c73..6d399616 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -721,8 +721,7 @@ static bool output_basic_test(struct wlr_output *output) { return false; } - if (output->pending.buffer_type == WLR_OUTPUT_STATE_BUFFER_SCANOUT && - output->back_buffer == NULL) { + if (output->back_buffer == NULL) { if (output->attach_render_locks > 0) { wlr_log(WLR_DEBUG, "Direct scan-out disabled by lock"); return false; @@ -911,7 +910,6 @@ void wlr_output_attach_buffer(struct wlr_output *output, struct wlr_buffer *buffer) { output_state_clear_buffer(&output->pending); output->pending.committed |= WLR_OUTPUT_STATE_BUFFER; - output->pending.buffer_type = WLR_OUTPUT_STATE_BUFFER_SCANOUT; output->pending.buffer = wlr_buffer_lock(buffer); } diff --git a/types/wlr_output_damage.c b/types/wlr_output_damage.c index 3d5a99e3..08a2baaa 100644 --- a/types/wlr_output_damage.c +++ b/types/wlr_output_damage.c @@ -52,8 +52,7 @@ static void output_handle_precommit(struct wl_listener *listener, void *data) { if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER) { // TODO: find a better way to access this info without a precommit // handler - output_damage->pending_attach_render = output->back_buffer != NULL || - output->pending.buffer_type == WLR_OUTPUT_STATE_BUFFER_RENDER; + output_damage->pending_attach_render = output->back_buffer != NULL; } } |