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:
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user