On Tuesday 08 Nov 2005 12:06, Chris Cannam wrote:
> The fundamental problem is that our cache "status" information (the
> refresh flag) doesn't reflect the actual status of the cache.

I've committed a fix for this.  It's an additional function that checks
whether the origin of the visible area has changed since it was last
cached, and scrolls the cache (prior to any other refreshes) if so.  This
is called from the paint event.  The aim is to ensure that our cache
always
exactly matches what's actually on screen, since we have no way to record
any differences in a meaningful way (and what's the good of having a
cache
if we can't tell whether it's up to date or not?).

Consequently I've also disconnected the contentsMoving signal, since the
contents moving does not alter the segment model, it only changes the
contents location, and that's dealt with by testing the coordinates as
above (I don't agree that scrolling is a contents change).

Finally (and in a separate commit) I remembered that if
m_segmentsDrawBufferNeedsRefresh is true, we need to redraw the entire
draw
buffer cache rather than just the exposed area, because that one flag
contains no information about which part of the cache has changed.  An
alternative to this would be to replace m_segmentsDrawBufferNeedsRefresh
with a rectangle to describe what area of the original canvas needed
refresh -- I think that would probably be overkill.


Chris


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to