summaryrefslogtreecommitdiff
path: root/riscos/htmlredraw.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-08-17 19:51:30 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-08-17 19:51:30 +0000
commit21b9ca0bf14e631cda7fa9e0bcb6c2d783368d22 (patch)
treefb6e979edec55d6fc88eb16034def93e98afcae8 /riscos/htmlredraw.c
parentb5e04ee27aa67a063f04a71764614c4d2a839f50 (diff)
downloadnetsurf-21b9ca0bf14e631cda7fa9e0bcb6c2d783368d22.tar.gz
netsurf-21b9ca0bf14e631cda7fa9e0bcb6c2d783368d22.tar.bz2
[project @ 2004-08-17 19:51:30 by jmb]
Lose optimisation svn path=/import/netsurf/; revision=1241
Diffstat (limited to 'riscos/htmlredraw.c')
-rw-r--r--riscos/htmlredraw.c47
1 files changed, 18 insertions, 29 deletions
diff --git a/riscos/htmlredraw.c b/riscos/htmlredraw.c
index 49f926eb9..089378282 100644
--- a/riscos/htmlredraw.c
+++ b/riscos/htmlredraw.c
@@ -292,44 +292,33 @@ bool html_redraw_box(struct box *box,
/* background colour */
if (box->style->background_color != TRANSPARENT) {
if (ro_gui_redraw_box_depth > 2) {
+ error = xcolourtrans_set_gcol(
+ box->style->background_color << 8,
+ colourtrans_USE_ECFS,
+ os_ACTION_OVERWRITE, 0, 0);
+ if (error) {
+ LOG(("xcolourtrans_set_gcol: 0x%x: %s", error->errnum, error->errmess));
+ return false;
+ }
- /* optimisation removed - transparent images break */
- /* optimisation: skip if fully repeated bg image */
- if (!box->background ||
- (ro_gui_current_redraw_gui &&
- !ro_gui_current_redraw_gui->option.background_images)
- /* || box->style->background_repeat !=
- CSS_BACKGROUND_REPEAT_REPEAT*/) {
-
- error = xcolourtrans_set_gcol(
- box->style->background_color << 8,
- colourtrans_USE_ECFS,
- os_ACTION_OVERWRITE, 0, 0);
- if (error) {
- LOG(("xcolourtrans_set_gcol: 0x%x: %s", error->errnum, error->errmess));
- return false;
- }
+ error = xos_plot(os_MOVE_TO, px0, py0);
+ if (error) {
+ LOG(("xos_plot: 0x%x: %s", error->errnum, error->errmess));
+ return false;
+ }
- error = xos_plot(os_MOVE_TO, px0, py0);
+ if (px0 < px1 && py0 < py1) {
+ error = xos_plot(os_PLOT_RECTANGLE | os_PLOT_TO,
+ px1 - 1, py1 - 1);
if (error) {
LOG(("xos_plot: 0x%x: %s", error->errnum, error->errmess));
return false;
}
-
- if (px0 < px1 && py0 < py1) {
- error = xos_plot(os_PLOT_RECTANGLE | os_PLOT_TO,
- px1 - 1, py1 - 1);
- if (error) {
- LOG(("xos_plot: 0x%x: %s", error->errnum, error->errmess));
- return false;
- }
- }
}
-
}
- /* set current background color for font painting */
- current_background_color = box->style->background_color;
}
+ /* set current background color for font painting */
+ current_background_color = box->style->background_color;
if (box->background) {
/* clip to padding box for everything but the main window */