# HG changeset patch # User Chris Cannam # Date 1211368155 0 # Node ID 5e4238d08caa20ff69ff5512ae24cc8af11f6d54 # Parent 52303ec15cd2197e9a2a277277acfe3119d860a3 * Provide a proper implementation of SpectrogramLayer::invalidatePixmapCaches(size_t, size_t) -- if the region is only part of the cache's current valid area, crop the valid area instead of resetting it completely. This makes a big difference when first rendering a spectrogram that is zoomed out a long way when the underlying calculation has not yet completed -- as is a common case in Vect for example. diff -r 52303ec15cd2 -r 5e4238d08caa data/fileio/MatrixFile.cpp --- a/data/fileio/MatrixFile.cpp Mon May 19 17:23:11 2008 +0000 +++ b/data/fileio/MatrixFile.cpp Wed May 21 11:09:15 2008 +0000 @@ -591,13 +591,13 @@ if (m_cache.data) { if (m_spareData) { - std::cerr << this << ": Freeing spare data" << std::endl; +// std::cerr << this << ": Freeing spare data" << std::endl; free(m_spareData); } - std::cerr << this << ": Moving old cache data to spare" << std::endl; +// std::cerr << this << ": Moving old cache data to spare" << std::endl; m_spareData = m_cache.data; } - std::cerr << this << ": Moving request data to cache" << std::endl; +// std::cerr << this << ": Moving request data to cache" << std::endl; m_cache.data = request.data; m_readThread->done(m_requestToken); @@ -621,10 +621,10 @@ #endif if (m_spareData) { - std::cerr << this << ": Freeing spare data" << std::endl; +// std::cerr << this << ": Freeing spare data" << std::endl; free(m_spareData); } - std::cerr << this << ": Moving request data to spare" << std::endl; +// std::cerr << this << ": Moving request data to spare" << std::endl; m_spareData = request.data; m_readThread->done(m_requestToken); @@ -641,7 +641,7 @@ request.start = m_headerSize + rx * m_height * m_cellSize; request.size = rw * m_height * m_cellSize; - std::cerr << this << ": Moving spare data to request, and resizing to " << rw * m_height * m_cellSize << std::endl; +// std::cerr << this << ": Moving spare data to request, and resizing to " << rw * m_height * m_cellSize << std::endl; request.data = (char *)realloc(m_spareData, rw * m_height * m_cellSize); MUNLOCK(request.data, rw * m_height * m_cellSize);