summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-02-11 17:05:42 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-02-11 17:05:42 +0000
commit99cab8389af03d5ca447d79b3a01885b1c22744a (patch)
tree5a0d061199daade75ef13bbb74442df0b97d2e38 /desktop
parentfc430dba753ee80762ff3ffdbde8be59a00ba9ab (diff)
downloadnetsurf-99cab8389af03d5ca447d79b3a01885b1c22744a.tar.gz
netsurf-99cab8389af03d5ca447d79b3a01885b1c22744a.tar.bz2
Early detection of regions outside the visible.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/textarea.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c
index eedc09115..61d21ccea 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -1600,6 +1600,15 @@ void textarea_redraw(struct textarea *ta, int x, int y, colour bg, float scale,
/* set clip rectangle for line part */
s = r;
+
+ if (s.x1 < left || s.x0 > right) {
+ /* Skip this span, it's outside the visible */
+ c_pos += c_len_part;
+ c_len -= c_len_part;
+ continue;
+ }
+
+ /* Adjust clip rectangle to span limits */
if (s.x0 < left)
s.x0 = left;
if (s.x1 > right)