Mercurial > hg > svgui
changeset 1081:cbc7c8675706 spectrogram-minor-refactor
Comments
author | Chris Cannam |
---|---|
date | Thu, 30 Jun 2016 18:21:11 +0100 |
parents | 2e5945b87aca |
children | 5b4fe7bb9430 |
files | layer/Colour3DPlotRenderer.cpp layer/ScrollableImageCache.h |
diffstat | 2 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/Colour3DPlotRenderer.cpp Thu Jun 30 16:28:32 2016 +0100 +++ b/layer/Colour3DPlotRenderer.cpp Thu Jun 30 18:21:11 2016 +0100 @@ -74,9 +74,9 @@ m_cache.scrollTo(startFrame); // if we are not time-constrained, then we want to paint - // the whole area in one go, and we're not going to - // provide the more complex logic to handle that if there - // are discontiguous areas involved. So if the only valid + // the whole area in one go; we don't return a partial + // paint. To avoid providing the more complex logic to + // handle painting discontiguous areas, if the only valid // part of cache is in the middle, just make the whole // thing invalid and start again. if (!timeConstrained) { @@ -91,10 +91,9 @@ bool rightToLeft = false; if (!m_cache.isValid() && timeConstrained) { - // When rendering the whole thing in a context where we - // might not be able to complete the work, start from - // somewhere near the middle so that the region of - // interest appears first + // When rendering the whole area, in a context where we might + // not be able to complete the work, start from somewhere near + // the middle so that the region of interest appears first //!!! (perhaps we should avoid doing this if past repaints //!!! have been fast enough to do the whole in one shot)
--- a/layer/ScrollableImageCache.h Thu Jun 30 16:28:32 2016 +0100 +++ b/layer/ScrollableImageCache.h Thu Jun 30 18:21:11 2016 +0100 @@ -122,10 +122,12 @@ * Take a left coordinate and width describing a region, and * adjust them so that they are contiguous with the cache valid * region and so that the union of the adjusted region with the - * cache valid region contains the supplied region. + * cache valid region contains the supplied region. Does not + * modify anything about the cache, only about the arguments. */ void adjustToTouchValidArea(int &left, int &width, bool &isLeftOfValidArea) const; + /** * Draw from an image onto the cache. The supplied image must have * the same height as the cache and the full height is always