Mercurial > hg > svgui
diff layer/ScrollableImageCache.h @ 1090:c8c747783110 spectrogram-minor-refactor
Cut over to using the renderer (though it's very incomplete) and fix some cache problems and pointer lifetime misunderstandings
author | Chris Cannam |
---|---|
date | Tue, 05 Jul 2016 17:48:26 +0100 |
parents | cbc7c8675706 |
children | 261a00010918 |
line wrap: on
line diff
--- a/layer/ScrollableImageCache.h Tue Jul 05 12:20:56 2016 +0100 +++ b/layer/ScrollableImageCache.h Tue Jul 05 17:48:26 2016 +0100 @@ -37,8 +37,7 @@ class ScrollableImageCache { public: - ScrollableImageCache(const LayerGeometryProvider *v = 0) : - m_v(v), + ScrollableImageCache() : m_left(0), m_width(0), m_startFrame(0), @@ -112,11 +111,12 @@ } /** - * Set the new start frame for the cache, if possible also moving - * along any existing valid data within the cache so that it - * continues to be valid for the new start frame. + * Set the new start frame for the cache, according to the + * geometry of the supplied LayerGeometryProvider, if possible + * also moving along any existing valid data within the cache so + * that it continues to be valid for the new start frame. */ - void scrollTo(sv_frame_t newStartFrame); + void scrollTo(LayerGeometryProvider *v, sv_frame_t newStartFrame); /** * Take a left coordinate and width describing a region, and @@ -142,7 +142,6 @@ int imageWidth); private: - const LayerGeometryProvider *m_v; QImage m_image; int m_left; // of valid region int m_width; // of valid region