1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-14 09:37:34 -05:00

Remove unused and bit-rotted scroll optimisation.

In the very old days, when PuTTY was new and computers were slow, I
tried to implement a feature where scrolling the window would be
implemented using a fast rectangle-copy GDI operation, rather than an
expensive character-by-character redraw of all the changed areas.

It never quite worked right, and I ended up conditioning it out on
Windows, and never even tried to implement it on GTK. It's now been
sitting around unused for so long that I think it's no longer worth
keeping in the code at all - if I tried to put it back in, it surely
wouldn't even compile, and would need rewriting from scratch anyway.

Disturbingly, it looks as if I _tried_ to re-enable it at one point,
in that there was a '#define OPTIMISE_IS_SCROLL 1' in putty.h - but
that never had any effect, because the macro name is misspelled. All
the #ifdefs are for 'OPTIMISE_SCROLL', without the 'IS'. So despite
appearances, it really _has_ been conditioned out all along!
This commit is contained in:
Simon Tatham
2018-10-25 18:34:39 +01:00
parent 6714fcddc6
commit 291c1b07f2
4 changed files with 5 additions and 155 deletions

View File

@ -20,15 +20,6 @@ typedef struct {
int y, x;
} pos;
#ifdef OPTIMISE_SCROLL
struct scrollregion {
struct scrollregion *next;
int topline; /* Top line of scroll region. */
int botline; /* Bottom line of scroll region. */
int lines; /* Number of lines to scroll by - +ve is forwards. */
};
#endif /* OPTIMISE_SCROLL */
typedef struct termchar termchar;
typedef struct termline termline;
@ -98,10 +89,6 @@ struct terminal_tag {
#define TTYPE termchar
#define TSIZE (sizeof(TTYPE))
#ifdef OPTIMISE_SCROLL
struct scrollregion *scrollhead, *scrolltail;
#endif /* OPTIMISE_SCROLL */
int default_attr, curr_attr, save_attr;
truecolour curr_truecolour, save_truecolour;
termchar basic_erase_char, erase_char;