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 f4da6fbfe83e00302e52a89265b2f2e84283df4c (commit) via 27bdc96dc97ee416a5d59c2c3155cbe6fdf00207 (commit) from d4c258f6b3bd05560a400bb20a9d428782262eb9 (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/f4da6fbfe83e00302e52a89265b2f2e84283d...
commit f4da6fbfe83e00302e52a89265b2f2e84283df4c Author: Cyril Hrubis metan@ucw.cz Date: Mon Jun 18 02:27:02 2012 +0200
spiv: Free caches before exit.
Which removes them from the valgrind warnings.
diff --git a/demos/spiv/spiv.c b/demos/spiv/spiv.c index 489188e..176fa56 100644 --- a/demos/spiv/spiv.c +++ b/demos/spiv/spiv.c @@ -750,6 +750,8 @@ int main(int argc, char *argv[]) case GP_KEY_ESC: case GP_KEY_ENTER: case GP_KEY_Q: + image_cache_drop(params.img_resized_cache); + image_cache_drop(params.img_orig_cache); GP_BackendExit(backend); return 0; break;
http://repo.or.cz/w/gfxprim.git/commit/27bdc96dc97ee416a5d59c2c3155cbe6fdf00...
commit 27bdc96dc97ee416a5d59c2c3155cbe6fdf00207 Author: Cyril Hrubis metan@ucw.cz Date: Mon Jun 18 01:56:25 2012 +0200
spiv: Stop loader thread before resizing backend buffer.
diff --git a/demos/spiv/spiv.c b/demos/spiv/spiv.c index 19f6d56..489188e 100644 --- a/demos/spiv/spiv.c +++ b/demos/spiv/spiv.c @@ -419,21 +419,26 @@ static void *image_loader(void *ptr)
static pthread_t loader_thread = (pthread_t)0;
-static void show_image(struct loader_params *params, const char *path) +static void stop_loader(void) { - int ret; - - /* stop previous loader thread */ if (loader_thread) { abort_flag = 1; pthread_join(loader_thread, NULL); loader_thread = (pthread_t)0; abort_flag = 0; } - +} + +static void show_image(struct loader_params *params, const char *path) +{ + int ret; + if (path != NULL) params->img_path = path;
+ /* stop previous loader thread */ + stop_loader(); + ret = pthread_create(&loader_thread, NULL, image_loader, (void*)params);
if (ret) { @@ -795,6 +800,8 @@ int main(int argc, char *argv[]) case GP_EV_SYS: switch (ev.code) { case GP_EV_SYS_RESIZE: + /* stop loader thread before resizing backend buffer */ + stop_loader(); GP_BackendResize(backend, ev.val.sys.w, ev.val.sys.h); GP_Fill(backend->context, 0); params.show_progress_once = 1;
-----------------------------------------------------------------------
Summary of changes: demos/spiv/spiv.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 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.