tests: convert image saver to pixman

This rewrites write_surface_as_png() into write_image_as_png(), which
operates on a pixman_image_t instead of a struct surface.

This is part of the migration to use pixman_image_t everywhere without
superfluous parameters/members.

Now the image saving handles more than just ARGB32 format, presumably.
At least it does not assume everything is always ARGB32.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h
index e74e835..adeeee3 100644
--- a/tests/weston-test-client-helper.h
+++ b/tests/weston-test-client-helper.h
@@ -202,7 +202,7 @@
 		   const struct rectangle *clip);
 
 bool
-write_surface_as_png(const struct surface *weston_surface, const char *fname);
+write_image_as_png(pixman_image_t *image, const char *fname);
 
 pixman_image_t *
 load_image_from_png(const char *fname);