diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-19 20:07:58 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-19 20:07:58 -0500 |
commit | 2e6e0a12e1d0962109fa2454b72bb0b9e6ae609e (patch) | |
tree | f9a00b86cfba6b7acfd9779d1fcb67be15363c8e /art_render_gradient.c | |
parent | 150562b89b645c402f1bb837a09f8b84bf6e49ec (diff) | |
download | libart-lgpl-2e6e0a12e1d0962109fa2454b72bb0b9e6ae609e.tar.gz libart-lgpl-2e6e0a12e1d0962109fa2454b72bb0b9e6ae609e.zip |
Clean up README file
Fix ABI incompatibility crash (thanks to James for debugging the failing code)
Clean up debug spew
Diffstat (limited to 'art_render_gradient.c')
-rw-r--r-- | art_render_gradient.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/art_render_gradient.c b/art_render_gradient.c index 008d61a..c0638f8 100644 --- a/art_render_gradient.c +++ b/art_render_gradient.c @@ -30,9 +30,6 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#if 0 -#include <assert.h> -#endif /* Hack to find out how to define alloca on different platforms. * Modified version of glib/galloca.h. @@ -205,9 +202,6 @@ calc_color_at (ArtGradientStop *stops, } printf ("WARNING! bad ix %d in calc_color_at() [internal error]\n", ix); -#if 0 - assert (0); -#endif } static void @@ -334,33 +328,19 @@ art_render_gradient_linear_render_8 (ArtRenderCallback *self, #ifdef DEBUG_SPEW printf ("Initial ix: %d\n", ix); #endif - -#if 0 - assert (ix > 0); - assert (ix < n_stops); - assert ((stops[ix-1].offset <= offset_fraction + EPSILON) || - ((stops[ix].offset > (1.0 - EPSILON)) && (offset_fraction < EPSILON /* == 0.0*/))); - assert (offset_fraction <= stops[ix].offset); - /* FIXME: These asserts may be broken, it is for now - safer to not use them. Should be fixed! - See bug #121850 - assert ((offset_fraction != stops[ix-1].offset) || - (d_offset >= 0.0)); - assert ((offset_fraction != stops[ix].offset) || - (d_offset <= 0.0)); - */ -#else + if (!( (ix > 0) && (ix < n_stops) && ((stops[ix-1].offset <= offset_fraction + EPSILON) || ((stops[ix].offset > (1.0 - EPSILON)) && (offset_fraction < EPSILON /* == 0.0*/))) && (offset_fraction <= stops[ix].offset))) { +#ifdef DEBUG_SPEW printf ("art_render_gradient.c:%d: Old assert() failed!\n", __LINE__); +#endif return; } -#endif - + while (width > 0) { #ifdef DEBUG_SPEW |