mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 17:18:10 +02:00
compositor: handle non-invertible surface transformations
Detect a non-invertible surface total transformation, disable it, and warn about it. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
460099f143
commit
7ae02130bd
1 changed files with 6 additions and 1 deletions
|
|
@ -250,7 +250,12 @@ weston_surface_update_transform(struct weston_surface *surface)
|
|||
wl_list_for_each(tform, &surface->transform.list, link)
|
||||
weston_matrix_multiply(matrix, &tform->matrix);
|
||||
|
||||
weston_matrix_invert(inverse, matrix);
|
||||
if (weston_matrix_invert(inverse, matrix) < 0) {
|
||||
/* Oops, bad total transformation, not invertible */
|
||||
surface->transform.enabled = 0;
|
||||
fprintf(stderr, "error: weston_surface %p"
|
||||
" transformation not invertible.\n", surface);
|
||||
}
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue