summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/igt_fb.c3
-rw-r--r--tests/kms_render.c2
-rw-r--r--tests/kms_setmode.c2
-rw-r--r--tests/testdisplay.c3
4 files changed, 3 insertions, 7 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 4289b50c..60b582fb 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -382,7 +382,10 @@ cairo_t *igt_get_cairo_ctx(int fd, struct igt_fb *fb)
surface = get_cairo_surface(fd, fb);
cr = cairo_create(surface);
cairo_surface_destroy(surface);
+ igt_assert(cairo_status(cr) == CAIRO_STATUS_SUCCESS);
+ cairo_select_font_face(cr, "Helvetica", CAIRO_FONT_SLANT_NORMAL,
+ CAIRO_FONT_WEIGHT_NORMAL);
igt_assert(cairo_status(cr) == CAIRO_STATUS_SUCCESS);
return cr;
diff --git a/tests/kms_render.c b/tests/kms_render.c
index d3928147..c4a6abb8 100644
--- a/tests/kms_render.c
+++ b/tests/kms_render.c
@@ -60,8 +60,6 @@ static int paint_fb(struct igt_fb *fb, const char *test_name,
igt_paint_color_gradient(cr, 0, 0, fb->width, fb->height, 1, 1, 1);
igt_paint_test_pattern(cr, fb->width, fb->height);
- cairo_select_font_face(cr, "Helvetica", CAIRO_FONT_SLANT_NORMAL,
- CAIRO_FONT_WEIGHT_NORMAL);
cairo_move_to(cr, fb->width / 2, fb->height / 2);
cairo_set_font_size(cr, 36);
igt_cairo_printf_line(cr, align_hcenter, 10, "%s", test_name);
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 802876a6..270d1a3a 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -152,8 +152,6 @@ static int paint_fb(struct igt_fb *fb, const char *test_name,
igt_paint_test_pattern(cr, fb->width, fb->height);
- cairo_select_font_face(cr, "Helvetica", CAIRO_FONT_SLANT_NORMAL,
- CAIRO_FONT_WEIGHT_NORMAL);
cairo_move_to(cr, fb->width / 2, fb->height / 2);
cairo_set_font_size(cr, 24);
igt_cairo_printf_line(cr, align_hcenter, 40, "%s", test_name);
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index c320a9c1..2b0233ea 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -284,9 +284,6 @@ static void paint_output_info(struct connector *c, struct igt_fb *fb)
igt_paint_test_pattern(cr, l_width, l_height);
- cairo_select_font_face(cr, "Helvetica",
- CAIRO_FONT_SLANT_NORMAL,
- CAIRO_FONT_WEIGHT_NORMAL);
cairo_move_to(cr, l_width / 2, l_height / 2);
/* Print connector and mode name */