1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -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

@ -5514,27 +5514,6 @@ void frontend_request_paste(Frontend *frontend, int clipboard)
hwnd, 0, &in_threadid);
}
#if 0
/*
* Move `lines' lines from position `from' to position `to' in the
* window.
*/
void optimised_move(Frontend *frontend, int to, int from, int lines)
{
RECT r;
int min, max;
min = (to < from ? to : from);
max = to + from - min;
r.left = offset_width;
r.right = offset_width + term->cols * font_width;
r.top = offset_height + min * font_height;
r.bottom = offset_height + (max + lines) * font_height;
ScrollWindow(hwnd, 0, (to - from) * font_height, &r, &r);
}
#endif
/*
* Print a modal (Really Bad) message box and perform a fatal exit.
*/