mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2025-01-13 20:01:35 +01:00
Better hwc_display_apply error handling
This commit is contained in:
parent
1ca4a03224
commit
7bea0c7bf7
1 changed files with 6 additions and 5 deletions
11
display.c
11
display.c
|
@ -217,7 +217,8 @@ static bool layer_choose_plane(struct hwc_layer *layer, drmModeAtomicReq *req)
|
|||
drmModeAtomicSetCursor(req, cursor);
|
||||
}
|
||||
|
||||
return false;
|
||||
fprintf(stderr, "Failed to find plane for layer %p\n", (void *)layer);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool hwc_display_apply(struct hwc_display *display, drmModeAtomicReq *req)
|
||||
|
@ -243,16 +244,16 @@ bool hwc_display_apply(struct hwc_display *display, drmModeAtomicReq *req)
|
|||
plane = &display->planes[i];
|
||||
if (plane->layer == NULL) {
|
||||
fprintf(stderr, "Disabling plane %d\n", plane->id);
|
||||
plane_apply(plane, NULL, req);
|
||||
if (!plane_apply(plane, NULL, req)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hwc_list_for_each(output, &display->outputs, link) {
|
||||
hwc_list_for_each(layer, &output->layers, link) {
|
||||
if (!layer_choose_plane(layer, req)) {
|
||||
fprintf(stderr,
|
||||
"Failed to find plane for layer %p\n",
|
||||
(void *)layer);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue