lib/igt_fb: setup font in igt_get_cairo_ctx

We always want the same boring one, so extract it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2014-03-26 16:36:46 +01:00
parent ae461e67e8
commit 7568edf4b1
4 changed files with 3 additions and 7 deletions
-2
View File
@@ -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);