summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-08-16 09:49:59 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-08-16 09:49:59 +0100
commit8a87058dc20980c3dffa3b6072d9ed7229a4eeaf (patch)
treece2b1ad7bad407e3693788e2ff4b4aa4289583de /riscos
parentc716a53bedad39d7fe663ea6e6a9a35987775c39 (diff)
downloadnetsurf-8a87058dc20980c3dffa3b6072d9ed7229a4eeaf.tar.gz
netsurf-8a87058dc20980c3dffa3b6072d9ed7229a4eeaf.tar.bz2
Remove pointless clipping. Move some calculations out of function call params to make them more readable.
Diffstat (limited to 'riscos')
-rw-r--r--riscos/treeview.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/riscos/treeview.c b/riscos/treeview.c
index 84450cdb4..d2ac36640 100644
--- a/riscos/treeview.c
+++ b/riscos/treeview.c
@@ -456,25 +456,20 @@ void ro_treeview_redraw_loop(wimp_draw *redraw, ro_treeview *tv, osbool more)
if (tv != NULL && tv->tree != NULL) {
struct rect clip;
+ clip.x0 = (redraw->clip.x0 -
+ (ro_plot_origin_x + tv->origin.x)) / 2;
+ clip.y0 = ((ro_plot_origin_y + tv->origin.y) -
+ redraw->clip.y1) / 2;
+
/* Treeview text alwyas has flat background colour,
* so disable unnecessary background blending */
no_font_blending = true;
tree_draw(tv->tree, tv->origin.x/2, -(tv->origin.y/2),
- (redraw->clip.x0
- -(ro_plot_origin_x+tv->origin.x))/2,
- ((ro_plot_origin_y+tv->origin.y)
- -redraw->clip.y1)/2,
+ clip.x0, clip.y0,
(redraw->clip.x1 - redraw->clip.x0)/2,
(redraw->clip.y1 - redraw->clip.y0)/2,
&ctx);
no_font_blending = false;
-
- /* Put the graphcis window back how the Wimp set it. */
- clip.x0 = (redraw->clip.x0 - ro_plot_origin_x) / 2;
- clip.y0 = (ro_plot_origin_y - redraw->clip.y1) / 2;
- clip.x1 = (redraw->clip.x1 - ro_plot_origin_x) / 2;
- clip.y1 = (ro_plot_origin_y - redraw->clip.y0) / 2;
- ro_plotters.clip(&clip);
}
error = xwimp_get_rectangle(redraw, &more);