libweston: Add function to create a view's buffer to output matrix
This can be helpful in testing if a paint node needs linear vs nearest neighbour filtering, or if a view can be placed on a plane. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
92a9860e1d
commit
d14753e80c
@ -810,6 +810,16 @@ weston_surface_to_buffer_region(struct weston_surface *surface,
|
||||
free(dest_rects);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
weston_view_buffer_to_output_matrix(const struct weston_view *view,
|
||||
const struct weston_output *output,
|
||||
struct weston_matrix *matrix)
|
||||
{
|
||||
*matrix = view->surface->buffer_to_surface_matrix;
|
||||
weston_matrix_multiply(matrix, &view->transform.matrix);
|
||||
weston_matrix_multiply(matrix, &output->matrix);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
weston_view_move_to_plane(struct weston_view *view,
|
||||
struct weston_plane *plane)
|
||||
|
@ -367,6 +367,10 @@ weston_view_takes_input_at_point(struct weston_view *view, int x, int y);
|
||||
void
|
||||
weston_view_move_to_plane(struct weston_view *view,
|
||||
struct weston_plane *plane);
|
||||
void
|
||||
weston_view_buffer_to_output_matrix(const struct weston_view *view,
|
||||
const struct weston_output *output,
|
||||
struct weston_matrix *matrix);
|
||||
|
||||
pixman_box32_t
|
||||
weston_matrix_transform_rect(struct weston_matrix *matrix,
|
||||
|
Loading…
Reference in New Issue
Block a user