From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 6/6] HACK: lib/igt_fb: Paint diagonals
Date: Tue, 10 Mar 2020 16:18:30 +0200 [thread overview]
Message-ID: <20200310141830.8040-6-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20200310141830.8040-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Paint diagonals on the standard test pattern so that scaling
artifacts are more readily visible.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_fb.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 0c4fdc5d4889..cc57493e01c5 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1479,6 +1479,18 @@ paint_marker(cairo_t *cr, int x, int y)
igt_cairo_printf_line(cr, align, 0, "(%d, %d)", x, y);
}
+static void
+paint_diagonals(cairo_t *cr, int w, int h)
+{
+ cairo_move_to(cr, 0, 0);
+ cairo_line_to(cr, w, h);
+ cairo_move_to(cr, 0, h);
+ cairo_line_to(cr, w, 0);
+ cairo_set_source_rgb(cr, 1, 1, 1);
+ cairo_set_line_width(cr, 1);
+ cairo_stroke(cr);
+}
+
/**
* igt_paint_test_pattern:
* @cr: cairo drawing context
@@ -1499,6 +1511,8 @@ void igt_paint_test_pattern(cairo_t *cr, int width, int height)
cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE);
+ paint_diagonals(cr, width, height);
+
/* Paint corner markers */
paint_marker(cr, 0, 0);
paint_marker(cr, width, 0);
--
2.24.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-03-10 14:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 14:18 [igt-dev] [PATCH i-g-t 1/6] tools/intel_scaler_coef: Add a tool for calculating scaler coefficients Ville Syrjala
2020-03-10 14:18 ` [igt-dev] [PATCH i-g-t 2/6] tools/intel_scaler_coef: Add support for chv plane " Ville Syrjala
2020-03-10 14:18 ` [igt-dev] [PATCH i-g-t 3/6] HACK: tools/intel_scaler_coef: Test ilk/snb/ivb panel fitter programmable coefficients Ville Syrjala
2020-03-10 14:18 ` [igt-dev] [PATCH i-g-t 4/6] HACK: tools/intel_scaler_coef: Test cnl+ pipe scaler " Ville Syrjala
2020-03-10 14:18 ` [igt-dev] [PATCH i-g-t 5/6] HACK: tools/intel_scaler_coef: Test chv plane " Ville Syrjala
2020-03-10 14:18 ` Ville Syrjala [this message]
2020-03-10 15:21 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] tools/intel_scaler_coef: Add a tool for calculating scaler coefficients Patchwork
2020-03-10 19:26 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
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=20200310141830.8040-6-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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