Gitweb links:
...log
http://git.netsurf-browser.org/libnsfb.git/shortlog/394336f6112468bf106ef...
...commit
http://git.netsurf-browser.org/libnsfb.git/commit/394336f6112468bf106ef28...
...tree
http://git.netsurf-browser.org/libnsfb.git/tree/394336f6112468bf106ef2885...
The branch, master has been updated
via 394336f6112468bf106ef2885bf528e25ded41ef (commit)
via 4694cd4f5c1dc6d3cac3eee8c13c35f6394f6036 (commit)
via 06881b9f188aad6b2e928ac284fd5d0ac33d9b0d (commit)
from 5c62d4740b6691ad0cd05863da47ec92e5f0cd7f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libnsfb.git/commit/?id=394336f6112468bf106...
commit 394336f6112468bf106ef2885bf528e25ded41ef
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Only memset as much of the error diffusion buffer as is required.
diff --git a/src/palette.c b/src/palette.c
index 1a24127..558ba28 100644
--- a/src/palette.c
+++ b/src/palette.c
@@ -54,10 +54,11 @@ void nsfb_palette_free(struct nsfb_palette_s *palette)
/** Init error diffusion for a plot. */
void nsfb_palette_dither_init(struct nsfb_palette_s *palette, int width)
{
+ width *= 3;
palette->dither = true;
- memset(palette->dither_ctx.data, 0, palette->dither_ctx.data_len);
- palette->dither_ctx.width = width * 3;
palette->dither_ctx.current = 0;
+ palette->dither_ctx.width = width;
+ memset(palette->dither_ctx.data, 0, width * sizeof(int));
}
/** Finalise error diffusion after a plot. */
commitdiff
http://git.netsurf-browser.org/libnsfb.git/commit/?id=4694cd4f5c1dc6d3cac...
commit 4694cd4f5c1dc6d3cac3eee8c13c35f6394f6036
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Set unused param in SDL_Color struct, to avoid valgrind uninitialised values from
within SDL_BlitSurface.
diff --git a/src/surface/sdl.c b/src/surface/sdl.c
index 48052a8..82e36f8 100644
--- a/src/surface/sdl.c
+++ b/src/surface/sdl.c
@@ -363,6 +363,7 @@ set_palette(nsfb_t *nsfb)
palette[loop].r = (nsfb->palette->data[loop] ) & 0xFF;
palette[loop].g = (nsfb->palette->data[loop] >> 8) & 0xFF;
palette[loop].b = (nsfb->palette->data[loop] >> 16) & 0xFF;
+ palette[loop].unused = 0; /* Suppress valgrind uninitialised values */
}
/* Set SDL palette */
commitdiff
http://git.netsurf-browser.org/libnsfb.git/commit/?id=06881b9f188aad6b2e9...
commit 06881b9f188aad6b2e928ac284fd5d0ac33d9b0d
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Fix 1x1 area scaled plot optimisation.
diff --git a/src/plot/api.c b/src/plot/api.c
index ba6afc8..1746d2e 100644
--- a/src/plot/api.c
+++ b/src/plot/api.c
@@ -155,7 +155,7 @@ nsfb_plot_copy(nsfb_t *srcfb,
return true;
/* completely opaque pixels can be replaced with fill */
- if ((srccol & 0xff000000) == 0xff)
+ if ((srccol & 0xff000000) == 0xff000000)
return dstfb->plotter_fns->fill(dstfb, dstbox, srccol);
}
-----------------------------------------------------------------------
Summary of changes:
src/palette.c | 5 +++--
src/plot/api.c | 2 +-
src/surface/sdl.c | 1 +
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/palette.c b/src/palette.c
index 1a24127..558ba28 100644
--- a/src/palette.c
+++ b/src/palette.c
@@ -54,10 +54,11 @@ void nsfb_palette_free(struct nsfb_palette_s *palette)
/** Init error diffusion for a plot. */
void nsfb_palette_dither_init(struct nsfb_palette_s *palette, int width)
{
+ width *= 3;
palette->dither = true;
- memset(palette->dither_ctx.data, 0, palette->dither_ctx.data_len);
- palette->dither_ctx.width = width * 3;
palette->dither_ctx.current = 0;
+ palette->dither_ctx.width = width;
+ memset(palette->dither_ctx.data, 0, width * sizeof(int));
}
/** Finalise error diffusion after a plot. */
diff --git a/src/plot/api.c b/src/plot/api.c
index ba6afc8..1746d2e 100644
--- a/src/plot/api.c
+++ b/src/plot/api.c
@@ -155,7 +155,7 @@ nsfb_plot_copy(nsfb_t *srcfb,
return true;
/* completely opaque pixels can be replaced with fill */
- if ((srccol & 0xff000000) == 0xff)
+ if ((srccol & 0xff000000) == 0xff000000)
return dstfb->plotter_fns->fill(dstfb, dstbox, srccol);
}
diff --git a/src/surface/sdl.c b/src/surface/sdl.c
index 48052a8..82e36f8 100644
--- a/src/surface/sdl.c
+++ b/src/surface/sdl.c
@@ -363,6 +363,7 @@ set_palette(nsfb_t *nsfb)
palette[loop].r = (nsfb->palette->data[loop] ) & 0xFF;
palette[loop].g = (nsfb->palette->data[loop] >> 8) & 0xFF;
palette[loop].b = (nsfb->palette->data[loop] >> 16) & 0xFF;
+ palette[loop].unused = 0; /* Suppress valgrind uninitialised values */
}
/* Set SDL palette */
--
NetSurf Framebuffer library