diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2006-07-10 09:52:31 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2006-07-10 09:52:31 +0000 |
commit | a47f148f2d9a7f06c7dddaf55d7e89c6e04349ef (patch) | |
tree | 1d0db22a55693f79ce5a4f267ebfde00c682d176 /render/html_redraw.c | |
parent | 0fe0a709ceeae77cc5d91aab318aec27320e09af (diff) | |
download | netsurf-a47f148f2d9a7f06c7dddaf55d7e89c6e04349ef.tar.gz netsurf-a47f148f2d9a7f06c7dddaf55d7e89c6e04349ef.tar.bz2 |
Optimise out redundant group_start and group_end calls (speed up rendering.)
svn path=/trunk/netsurf/; revision=2725
Diffstat (limited to 'render/html_redraw.c')
-rw-r--r-- | render/html_redraw.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/render/html_redraw.c b/render/html_redraw.c index 2dd788a94..f70e9eefa 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -192,16 +192,16 @@ bool html_redraw_box(struct box *box, /* if visibility is hidden render children only */ if (box->style && box->style->visibility == CSS_VISIBILITY_HIDDEN) { - if (!plot.group_start("hidden box")) + if ((plot.group_start) && (!plot.group_start("hidden box"))) return false; if (!html_redraw_box_children(box, x_parent, y_parent, x0, y0, x1, y1, scale, current_background_color)) return false; - return plot.group_end(); + return ((!plot.group_end) || (plot.group_end())); } - if (!plot.group_start("vis box")) + if ((plot.group_start) && (!plot.group_start("vis box"))) return false; /* dotted debug outlines */ @@ -237,7 +237,7 @@ bool html_redraw_box(struct box *box, /* return if the box is completely outside the clip rectangle */ if (clip_y1 < y0 || y1 < clip_y0 || clip_x1 < x0 || x1 < clip_x0) - return plot.group_end(); + return ((!plot.group_end) || (plot.group_end())); if (box->type == BOX_BLOCK || box->type == BOX_INLINE_BLOCK || box->type == BOX_TABLE_CELL || box->object) { @@ -347,7 +347,7 @@ bool html_redraw_box(struct box *box, if (!plot.clip(clip_x0, clip_y0, clip_x1, clip_y1)) return false; - return plot.group_end(); + return ((!plot.group_end) || (plot.group_end())); } |