mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
no create cached waveview images that span from render-start to cache-start, but always clamp the end to render-end, to avoid creating over-sized images
This commit is contained in:
parent
e55ed5d642
commit
0c170b0897
1 changed files with 2 additions and 6 deletions
|
|
@ -174,7 +174,7 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
|
||||||
need another one for the missing bit.
|
need another one for the missing bit.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CacheEntry* c = new CacheEntry (this, p, (*cache)->start());
|
CacheEntry* c = new CacheEntry (this, p, min (end, (*cache)->start()));
|
||||||
cache = _cache.insert (cache, c);
|
cache = _cache.insert (cache, c);
|
||||||
++cache;
|
++cache;
|
||||||
render = c;
|
render = c;
|
||||||
|
|
@ -369,11 +369,7 @@ WaveView::set_region_start (frameoffset_t start)
|
||||||
/** Construct a new CacheEntry with peak data between two offsets
|
/** Construct a new CacheEntry with peak data between two offsets
|
||||||
* in the source.
|
* in the source.
|
||||||
*/
|
*/
|
||||||
WaveView::CacheEntry::CacheEntry (
|
WaveView::CacheEntry::CacheEntry (WaveView const * wave_view, int start, int end)
|
||||||
WaveView const * wave_view,
|
|
||||||
int start,
|
|
||||||
int end
|
|
||||||
)
|
|
||||||
: _wave_view (wave_view)
|
: _wave_view (wave_view)
|
||||||
, _start (start)
|
, _start (start)
|
||||||
, _end (end)
|
, _end (end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue