Mercurial > hg > svcore
changeset 111:1be256ac7681
* It turns out we can be more efficient in the spectrogram repaints by
marking the spectrogram layer as non-scrollable, and using the spectrogram
cache alone instead of both spectrogram and view caches.
author | Chris Cannam |
---|---|
date | Tue, 09 May 2006 12:43:55 +0000 |
parents | c1188c5a991d |
children | 7648e8502822 |
files | base/View.cpp |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/base/View.cpp Mon May 08 20:15:23 2006 +0000 +++ b/base/View.cpp Tue May 09 12:43:55 2006 +0000 @@ -906,14 +906,20 @@ // backmost non-scrollable layer. LayerList scrollables; + bool metUnscrollable = false; + for (LayerList::const_iterator i = m_layers.begin(); i != m_layers.end(); ++i) { if ((*i)->isLayerDormant(this)) continue; if ((*i)->isLayerOpaque()) { // You can't see anything behind an opaque layer! scrollables.clear(); + if (metUnscrollable) break; } - if ((*i)->isLayerScrollable(this)) scrollables.push_back(*i); - else break; + if (!metUnscrollable && (*i)->isLayerScrollable(this)) { + scrollables.push_back(*i); + } else { + metUnscrollable = true; + } } if (testChanged && scrollables != m_lastScrollableBackLayers) { @@ -927,7 +933,6 @@ View::getNonScrollableFrontLayers(bool testChanged, bool &changed) const { changed = false; - LayerList scrollables = getScrollableBackLayers(testChanged, changed); LayerList nonScrollables; // Everything in front of the first non-scrollable from the back