From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: fix size change and alpha tests
Date: Thu, 14 Oct 2021 11:42:35 +0300 [thread overview]
Message-ID: <YWftexnS+5L4uyFd@intel.com> (raw)
In-Reply-To: <20211012142224.15632-1-juhapekka.heikkila@gmail.com>
On Tue, Oct 12, 2021 at 05:22:24PM +0300, Juha-Pekka Heikkila wrote:
> Unify and simplify cursor size change and cursor alpha tests.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> tests/kms_cursor_crc.c | 190 ++++++++++++-----------------------------
> 1 file changed, 56 insertions(+), 134 deletions(-)
>
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> index 9faba1a18..7d9ec1927 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -71,7 +71,7 @@ typedef struct {
> igt_plane_t *cursor;
> cairo_surface_t *surface;
> uint32_t devid;
> - bool hwimageistestimage;
> + double alpha;
> } data_t;
>
> #define TEST_DPMS (1<<0)
> @@ -89,7 +89,7 @@ typedef struct {
> int height;
> } cursorarea;
>
> -static void draw_cursor(cairo_t *cr, cursorarea *cursor)
> +static void draw_cursor(cairo_t *cr, cursorarea *cursor, double alpha)
> {
> int wl, wr, ht, hb;
>
> @@ -104,13 +104,13 @@ static void draw_cursor(cairo_t *cr, cursorarea *cursor)
> (cursor->y < SHRT_MIN) || (cursor->y > SHRT_MAX))
> return;
>
> - cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> + cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
> cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
> /* 4 color rectangles in the corners, RGBY */
> - igt_paint_color(cr, cursor->x, cursor->y, wl, ht, RED);
> - igt_paint_color(cr, cursor->x + wl, cursor->y, wr, ht, GREEN);
> - igt_paint_color(cr, cursor->x, cursor->y + ht, wl, hb, BLUE);
> - igt_paint_color(cr, cursor->x + wl, cursor->y + ht, wr, hb, WHITE);
> + igt_paint_color_alpha(cr, cursor->x, cursor->y, wl, ht, RED, alpha);
> + igt_paint_color_alpha(cr, cursor->x + wl, cursor->y, wr, ht, GREEN, alpha);
> + igt_paint_color_alpha(cr, cursor->x, cursor->y + ht, wl, hb, BLUE, alpha);
> + igt_paint_color_alpha(cr, cursor->x + wl, cursor->y + ht, wr, hb, WHITE, alpha);
Is this an actual bugfix? The alpha seems to have disappeared at some
point.
Hmm. test_cursor_alpha() is apparently creating its own fb currently,
and clobbering data->fb which was created by the top level fixture for
everyone else. Ugh.
Anyways, the diff is huge, can't really figure out what the heck
it's doing. There seems to be some code motion in there as well,
but maybe with other changes sprinkled in? Dunno. Can you split
it up a bit?
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2021-10-14 8:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 14:22 [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: fix size change and alpha tests Juha-Pekka Heikkila
2021-10-12 15:18 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-10-12 19:26 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-10-14 8:42 ` Ville Syrjälä [this message]
2021-10-14 11:03 ` [igt-dev] [PATCH i-g-t] " Juha-Pekka Heikkila
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=YWftexnS+5L4uyFd@intel.com \
--to=ville.syrjala@linux.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