1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-03 20:42:48 -05:00

Attribute masking implemented. The variable attr_mask stored the current

set of "interesting" attributes, and do_paint only takes those ones into
account when deciding when to break style runs.  Makes redraw quite a bit
faster on displays which don't do ANSI colour.

[originally from svn r102]
This commit is contained in:
Ben Harris
1999-03-14 17:43:35 +00:00
parent 61504ef68c
commit c7c358fa3f
3 changed files with 35 additions and 10 deletions

View File

@ -1242,7 +1242,7 @@ static void do_paint (Context ctx, int may_optimise){
unsigned long t = wanttext[idx];
int needs_update = (j < cols && t != disptext[idx]);
int keep_going = (start != -1 && needs_update &&
(t & ATTR_MASK) == attr &&
(t & attr_mask) == attr &&
j-start < sizeof(ch));
if (start != -1 && !keep_going) {
do_text (ctx, start, i, ch, j-start, attr);
@ -1251,7 +1251,7 @@ static void do_paint (Context ctx, int may_optimise){
if (needs_update) {
if (start == -1) {
start = j;
attr = t & ATTR_MASK;
attr = t & attr_mask;
}
ch[j-start] = (char) (t & CHAR_MASK);
}