summaryrefslogtreecommitdiff
path: root/desktop/knockout.c
diff options
context:
space:
mode:
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;
}