drm: Cache buffer to output matrix in paint node

We use this a few times for plane tests, so we can cache it here to avoid
recalculating it.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2023-01-06 11:59:14 -06:00 committed by Daniel Stone
parent 7c7489fe79
commit 2a1a8994c4
2 changed files with 4 additions and 4 deletions

View File

@ -105,11 +105,10 @@ weston_output_create_heads_string(struct weston_output *output);
static void
paint_node_update(struct weston_paint_node *pnode)
{
struct weston_matrix tmp_matrix;
struct weston_matrix *mat = &pnode->buffer_to_output_matrix;
weston_view_buffer_to_output_matrix(pnode->view, pnode->output,
&tmp_matrix);
pnode->needs_filtering = weston_matrix_needs_filtering(&tmp_matrix);
weston_view_buffer_to_output_matrix(pnode->view, pnode->output, mat);
pnode->needs_filtering = weston_matrix_needs_filtering(mat);
}
static struct weston_paint_node *

View File

@ -480,6 +480,7 @@ struct weston_paint_node {
/* Mutable members: */
struct weston_matrix buffer_to_output_matrix;
bool needs_filtering;
/* struct weston_output::paint_node_z_order_list */