composior: fix tiny cursor bug with drm compositor

The drm compositor always creates a 64x64 bo for the cursor image
regardless of the size of the actual cursor. When the fade animation
kicks in it disables the hardware cursor so that it is rendered as a
regular surface. This surface is rendered to a 32x32 region but using
a 64x64 texture so the cursor gets scaled down.

Fix this by making create_cursor_image return the actual size of the
image created to the compositor.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
diff --git a/compositor/compositor-drm.c b/compositor/compositor-drm.c
index f3fc194..c0bf9ff 100644
--- a/compositor/compositor-drm.c
+++ b/compositor/compositor-drm.c
@@ -692,7 +692,7 @@
 
 static EGLImageKHR
 drm_compositor_create_cursor_image(struct wlsc_compositor *ec,
-				   int32_t width, int32_t height)
+				   int32_t *width, int32_t *height)
 {
 	struct drm_compositor *c = (struct drm_compositor *) ec;
 	struct gbm_bo *bo;
@@ -700,7 +700,7 @@
 	uint32_t *pixels;
 	GLuint tex;
 
-	if (width > 64 || height > 64)
+	if (*width > 64 || *height > 64)
 		return EGL_NO_IMAGE_KHR;
 
 	bo = gbm_bo_create(c->gbm,
@@ -714,7 +714,7 @@
 
 	/* If the requested size is smaller than the allocated one, make the
 	 * whole image transparent. */
-	if (width != 64 || height != 64) {
+	if (*width != 64 || *height != 64) {
 		pixels = calloc(64 * 64, sizeof *pixels);
 
 		glGenTextures(1, &tex);
@@ -734,6 +734,9 @@
 
 		glDeleteTextures(1, &tex);
 		free(pixels);
+
+		*width = 64;
+		*height = 64;
 	}
 
 	return image;