From b1f67a5082420bbff141733833905f8ac95fe983 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 11 Feb 2010 17:15:05 -0800 Subject: [PATCH] glamor: Fix and enable glamor_get_spans(). This makes running the cairo test suite almost tolerable. --- glamor/glamor_getspans.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/glamor/glamor_getspans.c b/glamor/glamor_getspans.c index 92ffba5cc..9b77f28db 100644 --- a/glamor/glamor_getspans.c +++ b/glamor/glamor_getspans.c @@ -57,8 +57,6 @@ glamor_get_spans(DrawablePtr drawable, uint8_t *temp_dst = NULL, *readpixels_dst = (uint8_t *)dst; int x_off, y_off; - goto fail; - switch (drawable->depth) { case 1: temp_dst = xalloc(wmax); @@ -71,9 +69,6 @@ glamor_get_spans(DrawablePtr drawable, type = GL_UNSIGNED_BYTE; break; case 24: - format = GL_RGB; - type = GL_UNSIGNED_BYTE; - break; case 32: format = GL_BGRA; type = GL_UNSIGNED_INT_8_8_8_8_REV; @@ -91,7 +86,7 @@ glamor_get_spans(DrawablePtr drawable, for (i = 0; i < count; i++) { glReadPixels(points[i].x + x_off, - points[i].y + y_off, + pixmap->drawable.height - 1 - (points[i].y + y_off), widths[i], 1, format, type,