summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-12-23 14:21:27 -0500
committerPietro Gagliardi <[email protected]>2014-12-23 14:21:27 -0500
commit663e9e99a7bb6dca2be3341cad6e025398d732e8 (patch)
tree0616996f80f1e52aae8d65840f0cc5d0d204acd5
parentc016143d8051cb5c38812376106e4a7849af9e2d (diff)
Optimized Table drawing by only drawing visible rows.
-rw-r--r--wintable/new/draw.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/wintable/new/draw.h b/wintable/new/draw.h
index dc19788..409a1ad 100644
--- a/wintable/new/draw.h
+++ b/wintable/new/draw.h
@@ -100,6 +100,8 @@ static void draw(struct table *t, HDC dc, RECT cliprect, RECT client)
p.x += p.width;
}
p.y += p.height;
+ if (p.y >= client.bottom) // >= because RECT.bottom is the first pixel outside the rect
+ break;
}
deselectFont(dc, prevfont, newfont);