We're pushing more and more mutable state into paint nodes, but this state
has a non-zero cost to rebuild every render.
Let's take care to track when we need to rebuild the state.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Add an output transform function that doesn't use matrices so we can
test our matrix generation by applying it to vectors and comparing with
the non-matrix variant.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Add tests to validate that weston_matrix_to_transform() works properly
on the matrices generated by weston_surface_build_buffer_matrix() and
weston_output_update_matrix()
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
When we build up a matrix from a series of operations, it's very useful
to know if the combined operations still result in something that matches
a wl_output_transform.
This adds a function to test if a matrix leads to a standard output
transform, and returns the transform if it does.
Tests are provided that check if complex series of operations return
expected results - the weston_matrix_needs_filtering function is tested
at the same time.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>