diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2013-01-07 01:19:49 -0600 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2013-01-07 01:19:49 -0600 |
commit | 50c692acd35b2c0cfe6125f820e5480f4b59ef19 (patch) | |
tree | d44bbb271db5ef4f5c5c491d94ff5647d4e18024 | |
parent | f45cdd9a4fef1096b071e6bad4cc40e06f48ba46 (diff) | |
download | pango-50c692acd35b2c0cfe6125f820e5480f4b59ef19.tar.gz |
Make test-pangocairo-threads stress fontconfig more
-rw-r--r-- | tests/test-pangocairo-threads.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test-pangocairo-threads.c b/tests/test-pangocairo-threads.c index e358f743..b33de73e 100644 --- a/tests/test-pangocairo-threads.c +++ b/tests/test-pangocairo-threads.c @@ -27,15 +27,16 @@ create_layout (cairo_t *cr) } static void -draw (cairo_t *cr, PangoLayout *layout) +draw (cairo_t *cr, PangoLayout *layout, unsigned int i) { cairo_set_source_rgba (cr, 1, 1, 1, 1); cairo_paint (cr); cairo_set_source_rgba (cr, 1, 1, 1, 0); cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); - /* force a relayout */ - pango_layout_context_changed (layout); + cairo_identity_matrix (cr); + cairo_scale (cr, (100 + i) / 10., (100 + i) / 10.); + pango_cairo_update_layout (cr, layout); pango_cairo_show_layout (cr, layout); } @@ -55,7 +56,7 @@ thread_func (gpointer data) g_mutex_unlock (&mutex); for (i = 0; i < num_iters; i++) - draw (cr, layout); + draw (cr, layout, i); return 0; } @@ -99,7 +100,7 @@ main (int argc, char **argv) unsigned char *ref_data = cairo_image_surface_get_data (ref_surface); unsigned int len = WIDTH * HEIGHT; - draw (cr, layout); + draw (cr, layout, num_iters - 1); /* cairo_surface_write_to_png (ref_surface, "test-pangocairo-threads-reference.png"); */ |