This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 21f49beeb9dfc819dd0b7f2b84118b83d02aa612 (commit) via 2ced0b701ab21aa80097e34669ba18a7bdd112b7 (commit) via 50e78cb9a15435c9d009f40ca46c73d90bd99a2d (commit) via b24b8b26fb9ef3841dc973e6d921da8b793ae42e (commit) from dc4ff99fcfb3320e4627e7f7c35c09c916da0809 (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 ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/21f49beeb9dfc819dd0b7f2b84118b83d02aa...
commit 21f49beeb9dfc819dd0b7f2b84118b83d02aa612 Author: Cyril Hrubis metan@ucw.cz Date: Tue Oct 15 22:23:38 2013 +0200
spiv: image_loader: Drop cur_img before dropping cache.
The image loader keeps reference to the top image, if drop cache is called the top image is freed with the rest of the cache so we need to drop the currently used image beforhand.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/demos/spiv/image_loader.c b/demos/spiv/image_loader.c index ae4ac6d..e03426e 100644 --- a/demos/spiv/image_loader.c +++ b/demos/spiv/image_loader.c @@ -230,6 +230,7 @@ unsigned int image_loader_dir_pos(void)
void image_loader_drop_cache(void) { + drop_cur_img(); image_cache_drop(img_cache); }
http://repo.or.cz/w/gfxprim.git/commit/2ced0b701ab21aa80097e34669ba18a7bdd11...
commit 2ced0b701ab21aa80097e34669ba18a7bdd112b7 Author: Cyril Hrubis metan@ucw.cz Date: Tue Oct 15 22:14:16 2013 +0200
backends: Implement ResizeAck() for virtual backend.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/backends/GP_BackendVirtual.c b/libs/backends/GP_BackendVirtual.c index 5ebf621..fd1c2d2 100644 --- a/libs/backends/GP_BackendVirtual.c +++ b/libs/backends/GP_BackendVirtual.c @@ -115,6 +115,21 @@ static void virt_exit(GP_Backend *self) free(self); }
+static int virt_resize_ack(GP_Backend *self) +{ + struct virt_priv *virt = GP_BACKEND_PRIV(self); + int ret; + + ret = virt->backend->ResizeAck(virt->backend); + + if (ret) + return ret; + + return GP_ContextResize(self->context, + virt->backend->context->w, + virt->backend->context->h); +} + GP_Backend *GP_BackendVirtualInit(GP_Backend *backend, GP_PixelType pixel_type, int flags) { @@ -147,6 +162,7 @@ GP_Backend *GP_BackendVirtualInit(GP_Backend *backend, self->Flip = virt_flip; self->UpdateRect = virt_update_rect; self->Exit = virt_exit; + self->ResizeAck = virt_resize_ack; self->Poll = backend->Poll ? virt_poll : NULL; self->Wait = backend->Wait ? virt_wait : NULL; self->SetAttributes = backend->SetAttributes ? virt_set_attrs : NULL;
http://repo.or.cz/w/gfxprim.git/commit/50e78cb9a15435c9d009f40ca46c73d90bd99...
commit 50e78cb9a15435c9d009f40ca46c73d90bd99a2d Author: Cyril Hrubis metan@ucw.cz Date: Tue Oct 15 22:11:20 2013 +0200
spiv: Add forgotten -e config opt
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/demos/spiv/spiv_config.c b/demos/spiv/spiv_config.c index 08b2f63..44a16d1 100644 --- a/demos/spiv/spiv_config.c +++ b/demos/spiv/spiv_config.c @@ -311,6 +311,7 @@ struct cfg_opt spiv_opts[] = { }, {.name_space = "Devel", .key = "BackendEmulation", + .opt = 'e', .opt_long = "backend-emulation", .opt_has_value = 1, .set = set_emulation,
http://repo.or.cz/w/gfxprim.git/commit/b24b8b26fb9ef3841dc973e6d921da8b793ae...
commit b24b8b26fb9ef3841dc973e6d921da8b793ae42e Author: Cyril Hrubis metan@ucw.cz Date: Tue Oct 15 22:01:18 2013 +0200
filters: ditherings: Enable all pixel types.
Make ditherings work with all pixel types.
Add conversion from any pixel type to RGB888 before the dithering is done. While this is not 100% correct solution it's good enough for the time being.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/filters/GP_FloydSteinberg.gen.c.t b/libs/filters/GP_FloydSteinberg.gen.c.t index 32a2534..f38cb8c 100644 --- a/libs/filters/GP_FloydSteinberg.gen.c.t +++ b/libs/filters/GP_FloydSteinberg.gen.c.t @@ -50,11 +50,11 @@ %% for pt in pixeltypes %% if pt.is_gray() or pt.is_rgb() and not pt.is_alpha() /* - * Floyd Steinberg RGB888 to {{ pt.name }} + * Floyd Steinberg to {{ pt.name }} */ -static int floyd_steinberg_RGB888_to_{{ pt.name }}_Raw(const GP_Context *src, - GP_Context *dst, - GP_ProgressCallback *callback) +static int floyd_steinberg_to_{{ pt.name }}_Raw(const GP_Context *src, + GP_Context *dst, + GP_ProgressCallback *callback) { %% for c in pt.chanslist float errors_{{ c[0] }}[2][src->w]; @@ -74,7 +74,10 @@ static int floyd_steinberg_RGB888_to_{{ pt.name }}_Raw(const GP_Context *src,
for (y = 0; y < (GP_Coord)src->h; y++) { for (x = 0; x < (GP_Coord)src->w; x++) { - GP_Pixel pix = GP_GetPixel_Raw_24BPP(src, x, y); + GP_Pixel pix; + + pix = GP_GetPixel_Raw(src, x, y); + pix = GP_PixelToRGB888(pix, src->pixel_type);
%% for c in pt.chanslist %% if pt.is_gray() @@ -131,7 +134,7 @@ static int floyd_steinberg(const GP_Context *src, GP_Context *dst, %% for pt in pixeltypes %% if pt.is_gray() or pt.is_rgb() and not pt.is_alpha() case GP_PIXEL_{{ pt.name }}: - return floyd_steinberg_RGB888_to_{{ pt.name }}_Raw(src, dst, callback); + return floyd_steinberg_to_{{ pt.name }}_Raw(src, dst, callback); %% endif %% endfor default: @@ -145,11 +148,6 @@ int GP_FilterFloydSteinberg(const GP_Context *src, GP_Context *dst, GP_CHECK(src->w <= dst->w); GP_CHECK(src->h <= dst->h);
- if (src->pixel_type != GP_PIXEL_RGB888) { - errno = ENOSYS; - return 1; - } - return floyd_steinberg(src, dst, callback); }
@@ -160,11 +158,6 @@ GP_Context *GP_FilterFloydSteinbergAlloc(const GP_Context *src, { GP_Context *ret;
- if (src->pixel_type != GP_PIXEL_RGB888) { - errno = ENOSYS; - return NULL; - } - ret = GP_ContextAlloc(src->w, src->h, pixel_type);
if (ret == NULL) diff --git a/libs/filters/GP_HilbertPeano.gen.c.t b/libs/filters/GP_HilbertPeano.gen.c.t index c1660e4..46a3eb9 100644 --- a/libs/filters/GP_HilbertPeano.gen.c.t +++ b/libs/filters/GP_HilbertPeano.gen.c.t @@ -56,9 +56,9 @@ static unsigned int count_bits(unsigned int n) /* * Hilbert Peano RGB888 to {{ pt.name }} */ -static int hilbert_peano_RGB888_to_{{ pt.name }}_Raw(const GP_Context *src, - GP_Context *dst, - GP_ProgressCallback *callback) +static int hilbert_peano_to_{{ pt.name }}_Raw(const GP_Context *src, + GP_Context *dst, + GP_ProgressCallback *callback) { struct GP_CurveState state; unsigned int n; @@ -79,7 +79,10 @@ static int hilbert_peano_RGB888_to_{{ pt.name }}_Raw(const GP_Context *src,
while (GP_HilbertCurveContinues(&state)) { if (state.x < src->w && state.y < src->h) { - GP_Pixel pix = GP_GetPixel_Raw_24BPP(src, state.x, state.y); + GP_Pixel pix; + + pix = GP_GetPixel_Raw(src, state.x, state.y); + pix = GP_PixelToRGB888(pix, src->pixel_type);
%% for c in pt.chanslist %% if pt.is_gray() @@ -141,7 +144,7 @@ static int hilbert_peano(const GP_Context *src, GP_Context *dst, %% for pt in pixeltypes %% if pt.is_gray() or pt.is_rgb() and not pt.is_alpha() case GP_PIXEL_{{ pt.name }}: - return hilbert_peano_RGB888_to_{{ pt.name }}_Raw(src, dst, callback); + return hilbert_peano_to_{{ pt.name }}_Raw(src, dst, callback); %% endif %% endfor default: @@ -155,11 +158,6 @@ int GP_FilterHilbertPeano(const GP_Context *src, GP_Context *dst, GP_CHECK(src->w <= dst->w); GP_CHECK(src->h <= dst->h);
- if (src->pixel_type != GP_PIXEL_RGB888) { - errno = ENOSYS; - return 1; - } - return hilbert_peano(src, dst, callback); }
@@ -169,11 +167,6 @@ GP_Context *GP_FilterHilbertPeanoAlloc(const GP_Context *src, { GP_Context *ret;
- if (src->pixel_type != GP_PIXEL_RGB888) { - errno = ENOSYS; - return NULL; - } - ret = GP_ContextAlloc(src->w, src->h, pixel_type);
if (ret == NULL)
-----------------------------------------------------------------------
Summary of changes: demos/spiv/image_loader.c | 1 + demos/spiv/spiv_config.c | 1 + libs/backends/GP_BackendVirtual.c | 16 ++++++++++++++++ libs/filters/GP_FloydSteinberg.gen.c.t | 25 +++++++++---------------- libs/filters/GP_HilbertPeano.gen.c.t | 23 ++++++++--------------- 5 files changed, 35 insertions(+), 31 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.