public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_cursor: use safe values for test image to avoid rounding errors
@ 2019-11-08 14:24 Juha-Pekka Heikkila
  2019-11-08 15:36 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Juha-Pekka Heikkila @ 2019-11-08 14:24 UTC (permalink / raw)
  To: igt-dev

instead of 0.5 use 1.0 for white color, this is due to bit replication
effect. Also set cairo to use same blending mode as what HW uses.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_cursor_crc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index d0fb8f1..0125122 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -78,12 +78,13 @@ static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch, double a)
 	/* Cairo doesn't like to be fed numbers that are too wild */
 	if ((x < SHRT_MIN) || (x > SHRT_MAX) || (y < SHRT_MIN) || (y > SHRT_MAX))
 		return;
+	cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
 	cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
 	/* 4 color rectangles in the corners, RGBY */
 	igt_paint_color_alpha(cr, x,      y,      wl, ht, 1.0, 0.0, 0.0, a);
 	igt_paint_color_alpha(cr, x + wl, y,      wr, ht, 0.0, 1.0, 0.0, a);
 	igt_paint_color_alpha(cr, x,      y + ht, wl, hb, 0.0, 0.0, 1.0, a);
-	igt_paint_color_alpha(cr, x + wl, y + ht, wr, hb, 0.5, 0.5, 0.5, a);
+	igt_paint_color_alpha(cr, x + wl, y + ht, wr, hb, 1.0, 1.0, 1.0, a);
 }
 
 static void cursor_enable(data_t *data)
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-11-14 15:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-08 14:24 [igt-dev] [PATCH i-g-t] tests/kms_cursor: use safe values for test image to avoid rounding errors Juha-Pekka Heikkila
2019-11-08 15:36 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-11-10  5:17 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-11-11 13:30 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2019-11-13  8:50 ` [igt-dev] [PATCH i-g-t] " Kahola, Mika
2019-11-14 15:17 ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox