summaryrefslogtreecommitdiff
path: root/libs/canvas/canvas/wave_view.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-06-04 17:45:58 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-04 17:46:53 -0400
commitbc945bb3d32726420c4f51374d3775e815e88d7c (patch)
tree3d4c95e547c8928feb1e0c0911de3fbdd0eed5cf /libs/canvas/canvas/wave_view.h
parent9e44e46c4aa45ccd6bca52ba3ee319a151a84fb2 (diff)
use existing partial existing waveview images (if they exist) while waiting for the full ones
Diffstat (limited to 'libs/canvas/canvas/wave_view.h')
-rw-r--r--libs/canvas/canvas/wave_view.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/libs/canvas/canvas/wave_view.h b/libs/canvas/canvas/wave_view.h
index 9a4cbafa7c..9f87855e54 100644
--- a/libs/canvas/canvas/wave_view.h
+++ b/libs/canvas/canvas/wave_view.h
@@ -143,7 +143,8 @@ class LIBCANVAS_API WaveViewCache
Coord height,
float amplitude,
Color fill_color,
- double samples_per_pixel);
+ double samples_per_pixel,
+ bool& full_image);
private:
/* an unsorted, unindexd collection of cache entries associated with
@@ -250,6 +251,8 @@ public:
double gradient_depth() const { return _gradient_depth; }
void set_shape (Shape);
+ void set_always_get_image_in_thread (bool yn);
+
/* currently missing because we don't need them (yet):
set_shape_independent();
set_logscaled_independent()
@@ -330,6 +333,12 @@ public:
*/
mutable bool get_image_in_thread;
+ /** If true, calls to get_image() will render a missing wave image
+ in the calling thread. Set true for waveviews we expect to
+ keep updating (e.g. while recording)
+ */
+ bool always_get_image_in_thread;
+
/** Set to true by render(). Used so that we know if the wave view
* has actually been displayed on screen. ::set_height() when this
* is true does not use get_image_in_thread, because it implies
@@ -351,8 +360,8 @@ public:
void handle_visual_property_change ();
void handle_clip_level_change ();
- boost::shared_ptr<WaveViewCache::Entry> get_image (framepos_t start, framepos_t end) const;
- boost::shared_ptr<WaveViewCache::Entry> get_image_from_cache (framepos_t start, framepos_t end) const;
+ boost::shared_ptr<WaveViewCache::Entry> get_image (framepos_t start, framepos_t end, bool& full_image) const;
+ boost::shared_ptr<WaveViewCache::Entry> get_image_from_cache (framepos_t start, framepos_t end, bool& full_image) const;
ArdourCanvas::Coord y_extent (double, bool) const;
void draw_image (Cairo::RefPtr<Cairo::ImageSurface>&, ARDOUR::PeakData*, int n_peaks, boost::shared_ptr<WaveViewThreadRequest>) const;