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>
dev
Pekka Paalanen 13 years ago
parent 460099f143
commit 7ae02130bd
  1. 7
      src/compositor.c

@ -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…
Cancel
Save