Move region transformation code to weston_transformed_region
Both the Pixman renderer and the X11 backend contained effectively the same
region transformation code. This commit adds a weston_transformed_region
function and changes pixman-renderer and compositor-x11 to use it.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
diff --git a/src/compositor.h b/src/compositor.h
index eb105a5..c2de99f 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -1301,6 +1301,11 @@
enum wl_output_transform transform,
int32_t scale,
pixman_box32_t rect);
+void
+weston_transformed_region(int width, int height,
+ enum wl_output_transform transform,
+ int32_t scale,
+ pixman_region32_t *src, pixman_region32_t *dest);
void *
weston_load_module(const char *name, const char *entrypoint);