mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
output-layers: change semantics of wlr_output_state.layers
Previously, we were requiring all layers to be included in wlr_output_state.layers and wlr_output_layer_state.buffer to be set to NULL to disable a layer. This commit changes these semantics: disabled layers are left out of wlr_output_state.layers, and wlr_output_layer_state.buffer is required to be non-NULL. This new API should make it easier for callers to populate the layers, at the cost of some additional complexity in backends, mostly addressed by introducing a new wlr_output_state_is_layer_enabled() helper.
This commit is contained in:
parent
f42920c414
commit
b931ac9ac0
8 changed files with 120 additions and 71 deletions
|
|
@ -804,11 +804,7 @@ static bool drm_connector_set_pending_layer_fbs(struct wlr_drm_connector *conn,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (layer_state->buffer != NULL) {
|
||||
drm_fb_import(&layer->pending_fb, drm, layer_state->buffer, NULL);
|
||||
} else {
|
||||
drm_fb_clear(&layer->pending_fb);
|
||||
}
|
||||
drm_fb_import(&layer->pending_fb, drm, layer_state->buffer, NULL);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue