mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-12 16:35:58 +01:00
output: drop wlr_output_state.buffer_type
This is now unconditionally set to WLR_OUTPUT_STATE_BUFFER_SCANOUT.
This commit is contained in:
parent
f211bc983a
commit
3132c0ab10
6 changed files with 3 additions and 20 deletions
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue