drm: Use cached matrix in drm_paint_node_transform_supported

We've passed the paint node deeply enough that we can now use the cached
matrix in it to save some calculations.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2023-01-06 12:01:49 -06:00 committed by Daniel Stone
parent 05eee6eaef
commit 68cad4db42
1 changed files with 1 additions and 5 deletions

View File

@ -665,15 +665,11 @@ drm_head_find_by_connector(struct drm_backend *backend, uint32_t connector_id);
static inline bool
drm_paint_node_transform_supported(struct weston_paint_node *node, struct weston_output *output)
{
struct weston_view *ev = node->view;
struct weston_matrix transform;
enum wl_output_transform wt;
weston_view_buffer_to_output_matrix(ev, output, &transform);
/* if false, the transform doesn't map to any of the standard
* (ie: 90 degree) output transformations. */
if (!weston_matrix_to_transform(&transform, &wt))
if (!weston_matrix_to_transform(&node->buffer_to_output_matrix, &wt))
return false;
if (wt != WL_OUTPUT_TRANSFORM_NORMAL)