compositor-drm: Support overlays with transformed buffers

Make overlays work when the client uses a buffer with the same
transformation as the output.

In order to calculate the destination rectangle, the same logic in
weston_surface_to_buffer_float() is needed, but with the output
dimensions instead. For that reason, this patch generalizes this
function into weston_transformed_{coord,rect} and moves it to util.c.
The surface functions are then implemented using those.
diff --git a/src/compositor.h b/src/compositor.h
index 6aa411d..15d6939 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -831,4 +831,13 @@
 int
 module_init(struct weston_compositor *compositor);
 
+void
+weston_transformed_coord(int width, int height,
+			 enum wl_output_transform transform,
+			 float sx, float sy, float *bx, float *by);
+pixman_box32_t
+weston_transformed_rect(int width, int height,
+			enum wl_output_transform transform,
+			pixman_box32_t rect);
+
 #endif