From 717450eb6a9bcea235d3aa4eb2c9f61e49aacce0 Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Thu, 25 Sep 2014 17:17:34 -0700 Subject: Skip the shadow test on stock upstream Cairo The shadow feature is implemented only on the cairogles branch at the moment. --- src/cairo-tests/shadow.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/cairo-tests/shadow.cpp') diff --git a/src/cairo-tests/shadow.cpp b/src/cairo-tests/shadow.cpp index b742b88..68b5f83 100644 --- a/src/cairo-tests/shadow.cpp +++ b/src/cairo-tests/shadow.cpp @@ -36,6 +36,7 @@ static double y_offset; static kinetics_t *particles; +#ifdef USE_CAIROGLES static void particle_init () { line_width = 20.0; @@ -100,10 +101,14 @@ static void fill_particle (caskbench_context_t *ctx, shapes_t *shape) cairo_set_line_width (cr, spread_line_width); cairo_stroke (cr); } +#endif int ca_setup_shadow(caskbench_context_t *ctx) { +#ifndef USE_CAIROGLES + return 0; +#else if (ctx->size < 0) return 0; // Animation & Shadow setup @@ -113,17 +118,25 @@ ca_setup_shadow(caskbench_context_t *ctx) particle_init (); return 1; +#endif } void ca_teardown_shadow(void) { +#ifndef USE_CAIROGLES + return; +#else free(particles); +#endif } int ca_test_shadow(caskbench_context_t *ctx) { +#ifndef USE_CAIROGLES + return 0; +#else cairo_set_source_rgb (ctx->cairo_cr, 1, 1, 1); cairo_rectangle (ctx->cairo_cr, 0, 0, ctx->canvas_width ,ctx->canvas_height); cairo_fill (ctx->cairo_cr); @@ -145,6 +158,7 @@ ca_test_shadow(caskbench_context_t *ctx) fill_particle (ctx, &shape); } return 1; +#endif } /* -- cgit v1.3.1-4-g156e