changeset 412:5e4238d08caa

* 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.
author Chris Cannam
date Wed, 21 May 2008 11:09:15 +0000
parents 52303ec15cd2
children 0b274e1aaf10
files data/fileio/MatrixFile.cpp
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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);