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 a69e12cc1918ea0b302e668fbcc378e95e9bda7e (commit) via b3041644e08a6a9306cbd22b908d3fc4312b55d0 (commit) via 81a4a805f6d839133ab4f7066d27ef5073b201e9 (commit) from e33c83da1ded26f2e05184e4847c197d05ec146b (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/a69e12cc1918ea0b302e668fbcc378e95e9bd...
commit a69e12cc1918ea0b302e668fbcc378e95e9bda7e Author: Cyril Hrubis metan@ucw.cz Date: Fri Dec 14 20:47:01 2012 +0100
loaders: GP_PNG.c: Fix crash on palette with alpha
diff --git a/libs/loaders/GP_PNG.c b/libs/loaders/GP_PNG.c index 87d9eca..c963794 100644 --- a/libs/loaders/GP_PNG.c +++ b/libs/loaders/GP_PNG.c @@ -107,6 +107,7 @@ GP_Context *GP_ReadPNG(FILE *f, GP_ProgressCallback *callback) GP_PixelType pixel_type = GP_PIXEL_UNKNOWN; GP_Context *res; int err; + double gamma;
png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
@@ -138,12 +139,14 @@ GP_Context *GP_ReadPNG(FILE *f, GP_ProgressCallback *callback) png_get_IHDR(png, png_info, &w, &h, &depth, &color_type, &interlace_type, NULL, NULL);
- GP_DEBUG(2, "Have %s%s interlace %s PNG%s size %ux%u depth %i", + png_get_gAMA(png, png_info, &gamma); + + GP_DEBUG(2, "Interlace=%s%s %s PNG%s size %ux%u depth %i gamma %.2lf", interlace_type_name(interlace_type), - color_type & PNG_COLOR_MASK_PALETTE ? " pallete " : "", + color_type & PNG_COLOR_MASK_PALETTE ? " pallete" : "", color_type & PNG_COLOR_MASK_COLOR ? "color" : "gray", color_type & PNG_COLOR_MASK_ALPHA ? " with alpha channel" : "", - (unsigned int)w, (unsigned int)h, depth); + (unsigned int)w, (unsigned int)h, depth, gamma);
switch (color_type) { case PNG_COLOR_TYPE_GRAY: @@ -187,7 +190,16 @@ GP_Context *GP_ReadPNG(FILE *f, GP_ProgressCallback *callback) //TODO: add palette matching to G2 G4 and G8 png_set_palette_to_rgb(png); png_set_bgr(png); - pixel_type = GP_PIXEL_RGB888; + + png_read_update_info(png, png_info); + + png_get_IHDR(png, png_info, &w, &h, &depth, + &color_type, NULL, NULL, NULL); + + if (color_type & PNG_COLOR_MASK_ALPHA) + pixel_type = GP_PIXEL_UNKNOWN; + else + pixel_type = GP_PIXEL_RGB888; break; }
@@ -212,14 +224,13 @@ GP_Context *GP_ReadPNG(FILE *f, GP_ProgressCallback *callback) /* start the actuall reading */ for (y = 0; y < h; y++) { png_bytep row = GP_PIXEL_ADDR(res, 0, y); - png_read_rows(png, &row, NULL, 1); + png_read_row(png, row, NULL);
if (GP_ProgressCallbackReport(callback, y, h, w)) { GP_DEBUG(1, "Operation aborted"); err = ECANCELED; goto err3; } - } png_destroy_read_struct(&png, &png_info, NULL);
http://repo.or.cz/w/gfxprim.git/commit/b3041644e08a6a9306cbd22b908d3fc4312b5...
commit b3041644e08a6a9306cbd22b908d3fc4312b55d0 Author: Cyril Hrubis metan@ucw.cz Date: Fri Dec 14 19:16:30 2012 +0100
backends: GP_X11.c: Make internal functions static.
diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c index d02b244..afe38fd 100644 --- a/libs/backends/GP_X11.c +++ b/libs/backends/GP_X11.c @@ -230,7 +230,8 @@ static int x11_set_attributes(struct GP_Backend *self, return 0; }
-void match_pixel_type(struct x11_priv *x11, enum GP_PixelType *pixel_type, int *depth) +static void match_pixel_type(struct x11_priv *x11, + enum GP_PixelType *pixel_type, int *depth) { /* * Eh, the XImage supports either 8, 16 or 32 bit pixels @@ -437,9 +438,9 @@ static int resize_ximage(GP_Backend *self, int w, int h) return 0; }
-void create_window(struct x11_priv *x11, int x, int y, - unsigned int *w, unsigned int *h, - const char *caption, enum GP_BackendX11Flags flags) +static void create_window(struct x11_priv *x11, int x, int y, + unsigned int *w, unsigned int *h, + const char *caption, enum GP_BackendX11Flags flags) { XSetWindowAttributes attrs; unsigned long attr_mask = 0;
http://repo.or.cz/w/gfxprim.git/commit/81a4a805f6d839133ab4f7066d27ef5073b20...
commit 81a4a805f6d839133ab4f7066d27ef5073b201e9 Author: Cyril Hrubis metan@ucw.cz Date: Fri Dec 14 19:13:35 2012 +0100
build: Edhance symbol detection script.
The script now works for backends and grabbers too.
diff --git a/build/check_symbols.sh b/build/check_symbols.sh index 9625ff6..f4ccd32 100755 --- a/build/check_symbols.sh +++ b/build/check_symbols.sh @@ -3,7 +3,7 @@ # Purpose of this script is to check library exported symbols #
-SYMBOLFILE=libGP_symbols.txt +SYMTMPFILE=symbols.txt
function grep_sym { @@ -19,19 +19,42 @@ function find_symbol find ../libs/ -name '*.o' | while read obj; do grep_sym "$obj" "$1"; done }
-objdump --dynamic-syms libGP.so | awk 'NR > 4 { print }' | awk '$3 != "*UND*"' | awk '{print $NF}' > $SYMBOLFILE +function get_symbols +{ + objdump --dynamic-syms "$1" | awk 'NR > 4 { print }' | awk '$3 != "*UND*"' | awk '{print $NF}' > "$2"
-# -# Remove compiler and glibc symbols -# -sed -i '/^.init$/d' $SYMBOLFILE -sed -i '/^__.*$/d' $SYMBOLFILE -sed -i '/^_.*$/d' $SYMBOLFILE + # + # Remove compiler and glibc symbols + # + sed -i '/^.init$/d' "$2" + sed -i '/^__.*$/d' "$2" + sed -i '/^_.*$/d' "$2" +}
-for i in `cat libGP_symbols.txt`; do - if ! grep "$i" syms/*.txt 2>&1 > /dev/null; then - find_symbol "$i" - fi -done +function check_symbols +{ + local symfile=$1 + shift + + for i in `cat $symfile`; do + if ! grep $i $@ 2>&1 > /dev/null; then + find_symbol "$i" + fi + done +} + +function do_check +{ + get_symbols "$1" $SYMTMPFILE + shift + check_symbols $SYMTMPFILE "$@" + rm $SYMTMPFILE +} + +do_check libGP.so syms/Core_symbols.txt syms/Event_symbols.txt + syms/Filters_symbols.txt syms/GFX_symbols.txt + syms/Loaders_symbols.txt syms/Text_symbols.txt + +do_check libGP_backends.so syms/Backend_symbols.txt
-rm libGP_symbols.txt +do_check libGP_grabbers.so syms/Grabbers_symbols.txt diff --git a/build/syms/Backend_symbols.txt b/build/syms/Backend_symbols.txt new file mode 100644 index 0000000..7eddbe5 --- /dev/null +++ b/build/syms/Backend_symbols.txt @@ -0,0 +1,10 @@ +GP_BackendInit +GP_BackendLinuxFBInit +GP_BackendVirtualInit +GP_BackendX11Init +GP_BackendSDLInit + +GP_ContextFromSurface + +GP_BackendResize +GP_BackendUpdateRectXYXY diff --git a/build/syms/Grabbers_symbols.txt b/build/syms/Grabbers_symbols.txt new file mode 100644 index 0000000..1cf56e1 --- /dev/null +++ b/build/syms/Grabbers_symbols.txt @@ -0,0 +1 @@ +GP_GrabberV4L2Init
-----------------------------------------------------------------------
Summary of changes: build/check_symbols.sh | 51 ++++++++++++++++++++++++++++---------- build/syms/Backend_symbols.txt | 10 +++++++ build/syms/Grabbers_symbols.txt | 1 + libs/backends/GP_X11.c | 9 ++++--- libs/loaders/GP_PNG.c | 23 +++++++++++++---- 5 files changed, 70 insertions(+), 24 deletions(-) create mode 100644 build/syms/Backend_symbols.txt create mode 100644 build/syms/Grabbers_symbols.txt
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.