All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libdrm 1/5] modetest: Make RGB565 pwetty too
@ 2013-04-17 19:18 ville.syrjala
  2013-04-17 19:18 ` [PATCH libdrm 2/5] modetest: Fix pitches, somewhat ville.syrjala
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: ville.syrjala @ 2013-04-17 19:18 UTC (permalink / raw)
  To: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/modetest/buffers.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c
index 5086381..6b117b4 100644
--- a/tests/modetest/buffers.c
+++ b/tests/modetest/buffers.c
@@ -601,7 +601,7 @@ fill_smpte(const struct format_info *info, void *planes[3], unsigned int width,
 #define BLUE  0
 
 static void
-make_pwetty(void *data, int width, int height, int stride)
+make_pwetty(void *data, int width, int height, int stride, int rgb16)
 {
 #ifdef HAVE_CAIRO
 	cairo_surface_t *surface;
@@ -609,7 +609,7 @@ make_pwetty(void *data, int width, int height, int stride)
 	int x, y;
 
 	surface = cairo_image_surface_create_for_data(data,
-						      CAIRO_FORMAT_ARGB32,
+						      rgb16 ? CAIRO_FORMAT_RGB16_565 : CAIRO_FORMAT_ARGB32,
 						      width, height,
 						      stride);
 	cr = cairo_create(surface);
@@ -716,6 +716,7 @@ static void
 fill_tiles_rgb16(const struct rgb_info *rgb, unsigned char *mem,
 		 unsigned int width, unsigned int height, unsigned int stride)
 {
+	unsigned char *mem_base = mem;
 	unsigned int x, y;
 
 	for (y = 0; y < height; ++y) {
@@ -732,6 +733,8 @@ fill_tiles_rgb16(const struct rgb_info *rgb, unsigned char *mem,
 		}
 		mem += stride;
 	}
+
+	make_pwetty(mem_base, width, height, stride, 1);
 }
 
 static void
@@ -777,7 +780,7 @@ fill_tiles_rgb32(const struct rgb_info *rgb, unsigned char *mem,
 		mem += stride;
 	}
 
-	make_pwetty(mem_base, width, height, stride);
+	make_pwetty(mem_base, width, height, stride, 0);
 }
 
 static void
-- 
1.8.1.5

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-04-18 14:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 19:18 [PATCH libdrm 1/5] modetest: Make RGB565 pwetty too ville.syrjala
2013-04-17 19:18 ` [PATCH libdrm 2/5] modetest: Fix pitches, somewhat ville.syrjala
2013-04-18 13:45   ` Laurent Pinchart
2013-04-17 19:18 ` [PATCH libdrm 3/5] modetest: Add support for all 16/32 bpp RGB formats ville.syrjala
2013-04-18 13:56   ` Laurent Pinchart
2013-04-17 19:18 ` [PATCH libdrm 4/5] modetest: Print possible_crtcs for planes ville.syrjala
2013-04-18 13:46   ` Laurent Pinchart
2013-04-17 19:18 ` [PATCH libdrm 5/5] modetest: Reduce the length of the connector type string ville.syrjala
2013-04-18 13:46   ` Laurent Pinchart
2013-04-18 13:43 ` [PATCH libdrm 1/5] modetest: Make RGB565 pwetty too Laurent Pinchart
2013-04-18 14:06   ` Ville Syrjälä
2013-04-18 14:19     ` Laurent Pinchart
2013-04-18 14:37       ` Ville Syrjälä

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.