From 0bd5611092973c257157a87b58f7d099957fe02d Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Thu, 7 Jan 2010 23:26:10 -0600 Subject: [PATCH] Make optimized drawing of timeline canvas a compile-time option. --- Makefile | 5 +++++ Timeline/Timeline.C | 4 ++++ configure | 2 ++ 3 files changed, 11 insertions(+) diff --git a/Makefile b/Makefile index f1fc371..ab473ff 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,11 @@ else CXXFLAGS := -fno-rtti -fno-exceptions endif + +ifeq ($(USE_UNOPTIMIZED_DRAWING),yes) + CFLAGS+=-DUSE_UNOPTIMIZED_DRAWING +endif + CFLAGS+=-DVERSION=\"$(VERSION)\" \ -DINSTALL_PREFIX=\"$(prefix)\" \ -DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \ diff --git a/Timeline/Timeline.C b/Timeline/Timeline.C index 12cfbb4..3097578 100644 --- a/Timeline/Timeline.C +++ b/Timeline/Timeline.C @@ -896,7 +896,11 @@ Timeline::draw ( void ) adjust_vscroll(); +#ifndef USE_UNOPTIMIZED_DRAWING if ( ( damage() & FL_DAMAGE_ALL ) || ( damage() & FL_DAMAGE_EXPOSE ) ) +#else + #warning Optimized drawing of timeline disabled. This will waste your CPU. +#endif { DMESSAGE( "complete redraw" ); diff --git a/configure b/configure index 58a6e23..034befb 100755 --- a/configure +++ b/configure @@ -13,6 +13,8 @@ ask "Installation prefix" prefix /usr/local ask "Use the LASH Audio Session Handler" USE_LASH yes ask "Build for debugging" USE_DEBUG no +using DEBUG && ask "Use unoptimized drawing routines" USE_UNOPTIMIZED_DRAWING no + begin_tests require_FLTK 1.1.7 images