Optimized Table drawing by only drawing visible rows.

This commit is contained in:
Pietro Gagliardi 2014-12-23 14:21:27 -05:00
parent c016143d80
commit 663e9e99a7
1 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,8 @@ static void draw(struct table *t, HDC dc, RECT cliprect, RECT client)
p.x += p.width; p.x += p.width;
} }
p.y += p.height; p.y += p.height;
if (p.y >= client.bottom) // >= because RECT.bottom is the first pixel outside the rect
break;
} }
deselectFont(dc, prevfont, newfont); deselectFont(dc, prevfont, newfont);