public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Kahola, Mika" <mika.kahola@intel.com>
To: "juhapekka.heikkila@gmail.com" <juhapekka.heikkila@gmail.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor: use safe values for test image to avoid rounding errors
Date: Wed, 13 Nov 2019 08:50:23 +0000	[thread overview]
Message-ID: <9cec20e3f72de86d28ab622cd1520ec512b40d75.camel@intel.com> (raw)
In-Reply-To: <1573223082-29928-1-git-send-email-juhapekka.heikkila@gmail.com>

On Fri, 2019-11-08 at 16:24 +0200, Juha-Pekka Heikkila wrote:
> 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>

Reviewed-by: Mika Kahola <mika.kahola@intel.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)
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-11-13  8:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Kahola, Mika [this message]
2019-11-14 15:17 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9cec20e3f72de86d28ab622cd1520ec512b40d75.camel@intel.com \
    --to=mika.kahola@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox