summaryrefslogtreecommitdiff
path: root/desktop/knockout.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-04-03 22:23:14 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-04-03 22:23:14 +0000
commitff6000745886cb085ca80e42498020497bc7f95f (patch)
tree41439653b4e24185009d6c48c9f8b37b4c93894f /desktop/knockout.c
parent2ca6e9a3e6bd7450cd1fb80db3a777956c804e11 (diff)
downloadnetsurf-ff6000745886cb085ca80e42498020497bc7f95f.tar.gz
netsurf-ff6000745886cb085ca80e42498020497bc7f95f.tar.bz2
Fix build with NDEBUG defined
svn path=/trunk/netsurf/; revision=12154
Diffstat (limited to 'desktop/knockout.c')
-rw-r--r--desktop/knockout.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/desktop/knockout.c b/desktop/knockout.c
index 3525df972..5d0ecbc2a 100644
--- a/desktop/knockout.c
+++ b/desktop/knockout.c
@@ -67,9 +67,10 @@
#include "desktop/knockout.h"
#include "desktop/plotters.h"
#include "image/bitmap.h"
-#define NDEBUG
#include "utils/log.h"
-#undef NDEBUG
+
+/* Define to enable knockout debug */
+#undef KNOCKOUT_DEBUG
#define KNOCKOUT_ENTRIES 3072 /* 40 bytes each */
#define KNOCKOUT_BOXES 768 /* 28 bytes each */
@@ -278,10 +279,12 @@ bool knockout_plot_flush(void)
struct knockout_box *box;
/* debugging information */
+#ifdef KNOCKOUT_DEBUG
LOG(("Entries are %i/%i, %i/%i, %i/%i",
knockout_entry_cur, KNOCKOUT_ENTRIES,
knockout_box_cur, KNOCKOUT_BOXES,
knockout_polygon_cur, KNOCKOUT_POLYGONS));
+#endif
/* release our plotter */
plot = real_plot;
@@ -690,8 +693,10 @@ bool knockout_plot_path(const float *p, unsigned int n, colour fill,
bool knockout_plot_clip(const struct rect *clip)
{
if (clip->x1 < clip->x0 || clip->y0 > clip->y1) {
+#ifdef KNOCKOUT_DEBUG
LOG(("bad clip rectangle %i %i %i %i",
clip->x0, clip->y0, clip->x1, clip->y1));
+#endif
return false;
}