From 2d18283379927c661e6862a769a7b8bd8763b743 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 21 Feb 2016 12:34:10 -0500 Subject: [PATCH] make threaded waveview rendering a configure time option (enabled by default) --- libs/canvas/wave_view.cc | 6 ++++++ wscript | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/canvas/wave_view.cc b/libs/canvas/wave_view.cc index f1f1653d70..bf99748c2c 100644 --- a/libs/canvas/wave_view.cc +++ b/libs/canvas/wave_view.cc @@ -73,7 +73,13 @@ WaveView::DrawingRequestQueue WaveView::request_queue; PBD::Signal0 WaveView::VisualPropertiesChanged; PBD::Signal0 WaveView::ClipLevelChanged; +/* NO_THREAD_WAVEVIEWS is defined by the top level wscript + * if --no-threaded-waveviws is provided at the configure step. + */ + +#ifndef NO_THREADED_WAVEVIEWS #define ENABLE_THREADED_WAVEFORM_RENDERING +#endif WaveView::WaveView (Canvas* c, boost::shared_ptr region) : Item (c) diff --git a/wscript b/wscript index 4635eaf390..06882ecca0 100644 --- a/wscript +++ b/wscript @@ -741,6 +741,8 @@ def options(opt): help='Turn on AddressSanitizer (requires GCC >= 4.8 or clang >= 3.1)') opt.add_option('--ptformat', action='store_true', default=False, dest='ptformat', help='Turn on PT session import option') + opt.add_option('--no-threaded-waveviews', action='store_true', default=False, dest='no_threaded_waveviews', + help='Disable threaded waveview rendering') for i in children: opt.recurse(i) @@ -1079,7 +1081,10 @@ int main () { return 0; } if opts.ptformat: conf.define('PTFORMAT', 1) conf.env['PTFORMAT'] = True - + if opts.no_threaded_waveviews: + conf.define('NO_THREADED_WAVEVIEWS', 1) + conf.env['NO_THREADED_WAVEVIEWS'] = True + backends = opts.with_backends.split(',') if not backends: