diff options
author | Mathieu Duponchelle <mathieu@centricular.com> | 2018-05-29 17:54:02 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-07-18 19:47:17 +0100 |
commit | 4645ecf3f89de9e25fc83d7c0fdb89188de7a2a3 (patch) | |
tree | fc8e21f0bf1aae66ed836b04d7a1325232430953 /test/cairo-test.c | |
parent | aee96d175d8349945a6d1948a56abd4b4ec6ad84 (diff) | |
download | cairo-4645ecf3f89de9e25fc83d7c0fdb89188de7a2a3.tar.gz |
record tests: fix when builddir != srcdir
When builddir != srcdir, cairo_test_create_pattern_from_png
needs a non-NULL ctx to work with.
Diffstat (limited to 'test/cairo-test.c')
-rw-r--r-- | test/cairo-test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/cairo-test.c b/test/cairo-test.c index dbfbf7e34..bab952603 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -1662,6 +1662,14 @@ cairo_test_get_context (cairo_t *cr) return cairo_get_user_data (cr, &_cairo_test_context_key); } +cairo_t * +cairo_test_create (cairo_surface_t *surface, cairo_test_context_t *ctx) +{ + cairo_t *cr = cairo_create(surface); + cairo_set_user_data(cr, &_cairo_test_context_key, ctx, NULL); + return cr; +} + cairo_surface_t * cairo_test_create_surface_from_png (const cairo_test_context_t *ctx, const char *filename) |