mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-03 01:41:10 -05:00
backend/drm: send output layer feedback events
This commit is contained in:
parent
e1335a792a
commit
22d9df2af4
4 changed files with 77 additions and 1 deletions
|
|
@ -349,6 +349,7 @@ static void layer_handle_addon_destroy(struct wlr_addon *addon) {
|
|||
drm_fb_clear(&layer->pending_fb);
|
||||
drm_fb_clear(&layer->queued_fb);
|
||||
drm_fb_clear(&layer->current_fb);
|
||||
free(layer->candidate_planes);
|
||||
free(layer);
|
||||
}
|
||||
|
||||
|
|
@ -381,6 +382,8 @@ static struct wlr_drm_layer *get_or_create_layer(struct wlr_drm_backend *drm,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
layer->wlr = wlr_layer;
|
||||
|
||||
#if HAVE_LIBLIFTOFF
|
||||
layer->liftoff = liftoff_layer_create(crtc->liftoff);
|
||||
if (layer->liftoff == NULL) {
|
||||
|
|
@ -391,6 +394,15 @@ static struct wlr_drm_layer *get_or_create_layer(struct wlr_drm_backend *drm,
|
|||
abort(); // unreachable
|
||||
#endif
|
||||
|
||||
layer->candidate_planes = calloc(sizeof(bool), drm->num_planes);
|
||||
if (layer->candidate_planes == NULL) {
|
||||
#if HAVE_LIBLIFTOFF
|
||||
liftoff_layer_destroy(layer->liftoff);
|
||||
#endif
|
||||
free(layer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wlr_addon_init(&layer->addon, &wlr_layer->addons, drm, &layer_impl);
|
||||
wl_list_insert(&crtc->layers, &layer->link);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue