From f25f5b8d15bae9674f4d81b97f337864ad62846c Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Thu, 7 Nov 2013 21:32:35 -0800 Subject: Integrate skia tests This merges skia into the build system, however: * It does not yet build the skia tests themselves * Paths are hardcoded to my personal paths * The cmake rules are rather brute forced --- src/cairo-tests/stroke.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/cairo-tests/stroke.cpp') diff --git a/src/cairo-tests/stroke.cpp b/src/cairo-tests/stroke.cpp index 858f755..2ae95ae 100644 --- a/src/cairo-tests/stroke.cpp +++ b/src/cairo-tests/stroke.cpp @@ -5,7 +5,7 @@ #include "caskbench.h" int -ca_setup_stroke(cairo_t *cr) +ca_setup_stroke(caskbench_context_t *ctx) { return 1; } @@ -16,19 +16,19 @@ ca_teardown_stroke(void) } int -ca_test_stroke(cairo_t *cr) +ca_test_stroke(caskbench_context_t *ctx) { int i, x, w, prev_w; x = 0; prev_w = 0; for (i=0; i<32; i++) { - randomize_color (cr); + randomize_color (ctx->cr); w = (32.0*rand())/RAND_MAX + 1; x += 4 + (prev_w + w)/2.0; - cairo_move_to (cr, x, 10); - cairo_line_to (cr, x, 70); - cairo_set_line_width (cr, w); - cairo_stroke (cr); + cairo_move_to (ctx->cr, x, 10); + cairo_line_to (ctx->cr, x, 70); + cairo_set_line_width (ctx->cr, w); + cairo_stroke (ctx->cr); prev_w = w; } return 1; -- cgit v1.3.1-4-g156e