diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2009-02-26 21:37:22 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2009-02-26 21:37:22 +0000 |
commit | c85268379ba1d4fc3a69c6ce8b28c69314ebd435 (patch) | |
tree | 0510923f5a9be0828c6d11420f741be2c3fee559 /framebuffer/fb_32bpp_plotters.c | |
parent | 4ba6b4324ecbf2793a5ce6138609ceb7e676e448 (diff) | |
download | netsurf-c85268379ba1d4fc3a69c6ce8b28c69314ebd435.tar.gz netsurf-c85268379ba1d4fc3a69c6ce8b28c69314ebd435.tar.bz2 |
try and improve plotter perfomance futher
svn path=/trunk/netsurf/; revision=6644
Diffstat (limited to 'framebuffer/fb_32bpp_plotters.c')
-rw-r--r-- | framebuffer/fb_32bpp_plotters.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/framebuffer/fb_32bpp_plotters.c b/framebuffer/fb_32bpp_plotters.c index f8284c5f8..45af64626 100644 --- a/framebuffer/fb_32bpp_plotters.c +++ b/framebuffer/fb_32bpp_plotters.c @@ -174,7 +174,6 @@ static bool fb_32bpp_polygon(const int *p, unsigned int n, colour fill) static bool fb_32bpp_fill(int x0, int y0, int x1, int y1, colour c) { int w; - uint32_t *pvid_line; uint32_t *pvid; uint32_t ent; uint32_t llen; @@ -185,18 +184,15 @@ static bool fb_32bpp_fill(int x0, int y0, int x1, int y1, colour c) return true; /* fill lies outside current clipping region */ ent = fb_colour_to_pixel(c); - llen = (framebuffer->linelen >> 2); width = x1 - x0; height = y1 - y0; + llen = (framebuffer->linelen >> 2) - width; - pvid_line = fb_32bpp_get_xy_loc(x0, y0); + pvid = fb_32bpp_get_xy_loc(x0, y0); - while (height > 0) { - height--; - pvid = pvid_line; - pvid_line += llen; - w = width; - while (w-- > 0) *pvid++ = ent; + while (height-- > 0) { + for (w = width; w > 0; w--) *pvid++ = ent; + pvid += llen; } return true; |