ucw.cz
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
List overview
Download
Gfxprim
May 2013
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
gfxprim@ucw.cz
1 participants
32 discussions
Start a n
N
ew thread
[repo.or.cz] gfxprim.git branch master updated: 7a70f93fbae16a2ff97c983e8c32968efabdaa0a
by metan
03 May '13
03 May '13
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 7a70f93fbae16a2ff97c983e8c32968efabdaa0a (commit) from de060ec35891593790612d5492f50c29c63b6248 (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/7a70f93fbae16a2ff97c983e8c32968efabd…
commit 7a70f93fbae16a2ff97c983e8c32968efabdaa0a Author: Cyril Hrubis <metan(a)ucw.cz> Date: Fri May 3 15:31:29 2013 +0200 backends: X11: Fix XImage pixel matching. Signed-off-by: Cyril Hrubis <metan(a)ucw.cz> diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c index 0ef7512..79b65c6 100644 --- a/libs/backends/GP_X11.c +++ b/libs/backends/GP_X11.c @@ -264,30 +264,12 @@ static int x11_resize_ack(struct GP_Backend *self) return ret; } -static void match_pixel_type(struct x11_win *win, - enum GP_PixelType *pixel_type, int *depth) -{ - /* - * Eh, the XImage supports either 8, 16 or 32 bit pixels - * - * Do best effor on selecting appropriate pixel type - */ - for (*depth = 8; *depth <= 32; *depth<<=1) { - *pixel_type = GP_PixelRGBMatch(win->vis->red_mask, - win->vis->green_mask, - win->vis->blue_mask, - 0x0, *depth); - - if (*pixel_type != GP_PIXEL_UNKNOWN) - break; - } -} - #ifdef HAVE_X_SHM static int create_shm_ximage(GP_Backend *self, GP_Size w, GP_Size h) { struct x11_win *win = GP_BACKEND_PRIV(self); + enum GP_PixelType pixel_type; if (XShmQueryExtension(win->dpy) == False) { GP_DEBUG(1, "MIT SHM Extension not supported, " @@ -298,18 +280,6 @@ static int create_shm_ximage(GP_Backend *self, GP_Size w, GP_Size h) if (self->context == NULL) GP_DEBUG(1, "Using MIT SHM Extension"); - enum GP_PixelType pixel_type; - int depth; - - if (self->context == NULL) - match_pixel_type(win, &pixel_type, &depth); - else - pixel_type = self->context->pixel_type; - - if (pixel_type == GP_PIXEL_UNKNOWN) { - GP_DEBUG(1, "Unknown pixel type"); - return 1; - } win->img = XShmCreateImage(win->dpy, win->vis, win->scr_depth, ZPixmap, NULL, &win->shminfo, w, h); @@ -321,6 +291,16 @@ static int create_shm_ximage(GP_Backend *self, GP_Size w, GP_Size h) size_t size = win->img->bytes_per_line * win->img->height; + pixel_type = GP_PixelRGBMatch(win->img->red_mask, + win->img->green_mask, + win->img->blue_mask, + 0x0, win->img->bits_per_pixel); + + if (pixel_type == GP_PIXEL_UNKNOWN) { + GP_DEBUG(1, "Unknown pixel type"); + goto err0; + } + win->shminfo.shmid = shmget(IPC_PRIVATE, size, 0600); if (win->shminfo.shmid == -1) { @@ -430,25 +410,46 @@ static int create_ximage(GP_Backend *self, GP_Size w, GP_Size h) enum GP_PixelType pixel_type; int depth; - match_pixel_type(win, &pixel_type, &depth); - - if (pixel_type == GP_PIXEL_UNKNOWN) { - GP_DEBUG(1, "Unknown pixel type"); - return 1; + /* Get depth similiar to the default visual depth */ + switch (win->scr_depth) { + case 32: + case 24: + depth = 32; + case 16: + depth = 16; + case 8: + depth = 8; + default: + /* TODO: better default */ + depth = 32; } - self->context = GP_ContextAlloc(w, h, pixel_type); - - if (self->context == NULL) - return 1; + GP_DEBUG(1, "Screen depth %i, using XImage depth %i", + win->scr_depth, depth); win->img = XCreateImage(win->dpy, win->vis, win->scr_depth, ZPixmap, 0, NULL, w, h, depth, 0); if (win->img == NULL) { GP_DEBUG(1, "Failed to create XImage"); - GP_ContextFree(self->context); - return 1; + goto err0; + } + + pixel_type = GP_PixelRGBMatch(win->img->red_mask, + win->img->green_mask, + win->img->blue_mask, + 0x0, win->img->bits_per_pixel); + + if (pixel_type == GP_PIXEL_UNKNOWN) { + GP_DEBUG(1, "Unknown pixel type"); + goto err1; + } + + self->context = GP_ContextAlloc(w, h, pixel_type); + + if (self->context == NULL) { + GP_DEBUG(1, "Malloc failed :("); + goto err1; } win->shm_flag = 0; @@ -456,6 +457,10 @@ static int create_ximage(GP_Backend *self, GP_Size w, GP_Size h) win->img->data = (char*)self->context->pixels; return 0; +err1: + XDestroyImage(win->img); +err0: + return 1; } static void destroy_ximage(GP_Backend *self) ----------------------------------------------------------------------- Summary of changes: libs/backends/GP_X11.c | 89 +++++++++++++++++++++++++---------------------- 1 files changed, 47 insertions(+), 42 deletions(-) repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive no reply. -- gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
1
0
0
0
[repo.or.cz] gfxprim.git branch master updated: de060ec35891593790612d5492f50c29c63b6248
by metan
03 May '13
03 May '13
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 de060ec35891593790612d5492f50c29c63b6248 (commit) via f7b1bfa7d24c44f3e03e6d3e8f20fe5d839964bd (commit) via 0dcd3ddb50bb7ee9fab8ed8b4a21bb9a909d4940 (commit) via 2b791b83c7976635a33543e76e1259c5dfb6454c (commit) from 0e5b7fc4ac8116f1037a244c21159e5fd86f114f (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/de060ec35891593790612d5492f50c29c63b…
commit de060ec35891593790612d5492f50c29c63b6248 Author: Cyril Hrubis <metan(a)ucw.cz> Date: Fri May 3 14:05:28 2013 +0200 build: Fix linker ordering and build. * Loaders are now in separate so library * Linker flags order is fixed and missing flags are added. This should fix build on Ubuntu. DON'T FORGET TO RUN ./cofigure BEFORE make Signed-off-by: Cyril Hrubis <metan(a)ucw.cz> diff --git a/app.mk b/app.mk index 77bd5e7..ccfdef1 100644 --- a/app.mk +++ b/app.mk @@ -1,12 +1,10 @@ -LDLIBS+=-lm - ALL+=$(APPS) CLEAN+=$(APPS) %: %.o ifdef VERBOSE - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,--start-group $^ $(LDLIBS) $(LDLIBS_GP) -Wl,--end-group -o $@ else @echo "LD $@" - @$(CC) $(CFLAGS) $(LDFLAGS) -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group -o $@ + @$(CC) $(CFLAGS) $(LDFLAGS) -Wl,--start-group $^ $(LDLIBS) $(LDLIBS_GP) -Wl,--end-group -o $@ endif diff --git a/build/get_objs.sh b/build/get_objs.sh index 3519b01..b6f1be5 100755 --- a/build/get_objs.sh +++ b/build/get_objs.sh @@ -1,7 +1,7 @@ #!/bin/sh TOPDIR=.. -LIBDIRS="core gfx text loaders filters input" +LIBDIRS="core gfx text filters input" for i in $LIBDIRS; do OBJECTS=`echo $TOPDIR/libs/$i/*.o`; diff --git a/config.mk b/config.mk index c149a0c..4a103d7 100644 --- a/config.mk +++ b/config.mk @@ -1,6 +1,7 @@ include $(TOPDIR)/config.gen.mk CFLAGS+=-I$(TOPDIR)/include/ +LDFLAGS+=-L$(TOPDIR)/build/ # path to local module directory PYLIBSDIR=$(TOPDIR)/pylib @@ -16,3 +17,9 @@ endif PYTHON=PYTHONPATH=$$PYTHONPATH:${PYLIBSDIR} ${PYTHON_BIN} -Werror SWIGOPTS=-w322,314 -I/usr/include/ + +# Linker flags +LDLIBS_GP=$(shell $(TOPDIR)/gfxprim-config --libs) +LDLIBS_LOADERS=$(shell $(TOPDIR)/gfxprim-config --libs-loaders) +LDLIBS_BACKENDS=$(shell $(TOPDIR)/gfxprim-config --libs-backends) +LDLIBS_GRABBERS=$(shell $(TOPDIR)/gfxprim-config --libs-grabbers) diff --git a/configure b/configure index 9deeb6c..894664f 100755 --- a/configure +++ b/configure @@ -160,7 +160,7 @@ class libraries: f.write("# %s - %sn" % (i[0], i[1])) if self.results[i[0]]: f.write("HAVE_%s=yesn" % i[0].upper()) - f.write("CFLAGS+=%snLDLIBS+=%sn" % (i[3], i[4])) + # f.write("CFLAGS+=%snLDLIBS+=%sn" % (i[3], i[4])) else: f.write("HAVE_%s=non" % i[0].upper()) @@ -240,20 +240,20 @@ def write_gfxprim_config(cfg, libs): f = open('gfxprim-config', 'w') f.write('#!/bin/shn' '#n# Generated by configure, do not edit directlyn#nn' - 'USAGE="Usage: $0 --list-modules --cflags --libs --libs-module_foo"n' - 'nif test $# -eq 0; thenn' - 'techo "$USAGE"n' - 'texit 1n' - 'finn' - 'while test -n "$1"; don' - 'tcase "$1" inn') + 'USAGE="Usage: $0 --list-modules --cflags --libs --libs-module_foo"n' + 'nif test $# -eq 0; thenn' + 'techo "$USAGE"n' + 'texit 1n' + 'finn' + 'while test -n "$1"; don' + 'tcase "$1" inn') # General switches cflags and ldflags f.write('t--help) echo "$USAGE"; exit 0;;n') f.write('t--list-modules) echo "%s"; exit 0;;n' % ' '.join(modules)) f.write('t--cflags) echo -n "-I/usr/include/GP/%s";;n' % libs.get_cflags('core')) - f.write('t--libs) echo -n "-lGP %s ";;n' % libs.get_linker_flags('core')) + f.write('t--libs) echo -n "-lGP -lm %s ";;n' % libs.get_linker_flags('core')) # ldflags for specific modules for i in modules: @@ -262,6 +262,8 @@ def write_gfxprim_config(cfg, libs): ldflags += '-lGP_backends ' if i == 'grabbers': ldflags += '-lGP_grabbers ' + if i == 'loaders': + ldflags += '-lGP_loaders ' ldflags += libs.get_linker_flags(i) f.write('t--libs-%s) echo -n "%s ";;n' % (i, ldflags)) diff --git a/demos/bogoman/Makefile b/demos/bogoman/Makefile index e90de8e..83d156e 100644 --- a/demos/bogoman/Makefile +++ b/demos/bogoman/Makefile @@ -3,8 +3,7 @@ TOPDIR=../.. CSOURCES=$(shell echo *.c) INCLUDE= -LDFLAGS+=-L$(TOPDIR)/build/ -LDLIBS+=`$(TOPDIR)/gfxprim-config --libs --libs-backends` +LDLIBS+=$(LDLIBS_BACKENDS) APPS=bogoman diff --git a/demos/c_simple/Makefile b/demos/c_simple/Makefile index b4a24d2..3ef9ff7 100644 --- a/demos/c_simple/Makefile +++ b/demos/c_simple/Makefile @@ -11,8 +11,7 @@ CSOURCES=$(SOURCES) endif INCLUDE= -LDFLAGS+=-L$(TOPDIR)/build/ -LDLIBS+=-lrt `$(TOPDIR)/gfxprim-config --libs --libs-backends` +LDLIBS+=-lrt APPS=backend_example loaders_example loaders filters_symmetry gfx_koch virtual_backend_example meta_data meta_data_dump tmp_file showimage@@ -23,10 +22,38 @@ APPS=backend_example loaders_example loaders filters_symmetry gfx_koch ifeq ($(HAVE_LIBSDL),yes) APPS+=SDL_glue + +SDL_glue: LDLIBS+=$(LDLIBS_BACKENDS) endif -v4l2_show: LDLIBS+=-lGP_grabbers -v4l2_grab: LDLIBS+=-lGP_grabbers +showimage: LDLIBS+=$(LDLIBS_BACKENDS) $(LDLIBS_LOADERS) +backend_example: LDLIBS+=$(LDLIBS_BACKENDS) +virtual_backend_example: LDLIBS+=$(LDLIBS_BACKENDS) +loaders_example: LDLIBS+=$(LDLIBS_LOADERS) +loaders: LDLIBS+=$(LDLIBS_LOADERS) +tmp_file: LDLIBS+=$(LDLIBS_LOADERS) +filters_symmetry: LDLIBS+=$(LDLIBS_LOADERS) +gfx_koch: LDLIBS+=$(LDLIBS_LOADERS) +meta_data: LDLIBS+=$(LDLIBS_LOADERS) +meta_data_dump: LDLIBS+=$(LDLIBS_LOADERS) +v4l2_show: LDLIBS+=$(LDLIBS_GRABBERS) $(LDLIBS_BACKENDS) +v4l2_grab: LDLIBS+=$(LDLIBS_GRABBERS) $(LDLIBS_LOADERS) +convolution: LDLIBS+=$(LDLIBS_LOADERS) +weighted_median: LDLIBS+=$(LDLIBS_LOADERS) +shapetest: LDLIBS+=$(LDLIBS_BACKENDS) +koch: LDLIBS+=$(LDLIBS_BACKENDS) +input_example: LDLIBS+=$(LDLIBS_BACKENDS) +fileview: LDLIBS+=$(LDLIBS_BACKENDS) +linetest: LDLIBS+=$(LDLIBS_BACKENDS) +randomshapetest: LDLIBS+=$(LDLIBS_BACKENDS) +fonttest: LDLIBS+=$(LDLIBS_BACKENDS) +textaligntest: LDLIBS+=$(LDLIBS_BACKENDS) +loaders_register: LDLIBS+=$(LDLIBS_LOADERS) +gaussian_noise: LDLIBS+=$(LDLIBS_LOADERS) +byte_utils: LDLIBS+=$(LDLIBS_LOADERS) +blittest: LDLIBS+=$(LDLIBS_BACKENDS) $(LDLIBS_LOADERS) +sin_AA: LDLIBS+=$(LDLIBS_BACKENDS) +x11_windows: LDLIBS+=$(LDLIBS_BACKENDS) include $(TOPDIR)/app.mk include $(TOPDIR)/post.mk diff --git a/demos/grinder/Makefile b/demos/grinder/Makefile index 4df5ea8..80e31e2 100644 --- a/demos/grinder/Makefile +++ b/demos/grinder/Makefile @@ -1,15 +1,15 @@ TOPDIR=../.. +include $(TOPDIR)/pre.mk CSOURCES=$(shell echo *.c) - INCLUDE=core gfx -LDFLAGS+=-L$(TOPDIR)/build/ -LDLIBS+=$(shell $(TOPDIR)/gfxprim-config --libs --libs-backends) -lrt + +LDLIBS+=-lrt -lm +LDLIBS+=$(LDLIBS_LOADERS) APPS=grinder grinder: params.o histogram.o -include $(TOPDIR)/pre.mk include $(TOPDIR)/app.mk include $(TOPDIR)/post.mk diff --git a/demos/spiv/Makefile b/demos/spiv/Makefile index 95e7560..c6747d2 100644 --- a/demos/spiv/Makefile +++ b/demos/spiv/Makefile @@ -4,7 +4,9 @@ CSOURCES=$(shell echo *.c) INCLUDE= LDFLAGS+=-L$(TOPDIR)/build/ -LDLIBS+=-lrt `$(TOPDIR)/gfxprim-config --libs --libs-backends` +LDLIBS+=-lrt + +LDLIBS+=$(LDLIBS_LOADERS) $(LDLIBS_BACKENDS) APPS=spiv diff --git a/demos/ttf2img/Makefile b/demos/ttf2img/Makefile index aab67a7..5fa8100 100644 --- a/demos/ttf2img/Makefile +++ b/demos/ttf2img/Makefile @@ -3,7 +3,8 @@ TOPDIR=../.. CSOURCES=$(shell echo *.c) INCLUDE= -LDLIBS+=-lGP -L$(TOPDIR)/build/ +LDLIBS+=-lm +LDLIBS+=$(LDLIBS_LOADERS) APPS=ttf2img diff --git a/libs/loaders/Makefile b/libs/loaders/Makefile index 076b940..5dc0799 100644 --- a/libs/loaders/Makefile +++ b/libs/loaders/Makefile @@ -4,6 +4,7 @@ include $(TOPDIR)/pre.mk CSOURCES=$(shell ls *.c) INCLUDE=core LIBNAME=loaders +BUILDLIB=yes include $(TOPDIR)/lib.mk include $(TOPDIR)/post.mk diff --git a/pylib/gfxprim/backends/Makefile b/pylib/gfxprim/backends/Makefile index fd62f34..320165e 100644 --- a/pylib/gfxprim/backends/Makefile +++ b/pylib/gfxprim/backends/Makefile @@ -2,10 +2,10 @@ TOPDIR=../../.. LIBNAME=backends INCLUDE=core -LDFLAGS+=$(shell $(TOPDIR)/gfxprim-config --libs-backends) - include $(TOPDIR)/pre.mk +LDLIBS+=$(LDLIBS_BACKENDS) + INSTALL_FILES+=_extend_backend.py include $(TOPDIR)/pywrap.mk diff --git a/pylib/gfxprim/grabbers/Makefile b/pylib/gfxprim/grabbers/Makefile index b001822..c864378 100644 --- a/pylib/gfxprim/grabbers/Makefile +++ b/pylib/gfxprim/grabbers/Makefile @@ -2,9 +2,10 @@ TOPDIR=../../.. LIBNAME=grabbers INCLUDE=core -LDFLAGS+=$(shell $(TOPDIR)/gfxprim-config --libs-grabbers) - include $(TOPDIR)/pre.mk + +LDLIBS+=$(LDLIBS_GRABBERS) + include $(TOPDIR)/pywrap.mk include $(TOPDIR)/post.mk diff --git a/pylib/gfxprim/loaders/Makefile b/pylib/gfxprim/loaders/Makefile index dd23e98..883a266 100644 --- a/pylib/gfxprim/loaders/Makefile +++ b/pylib/gfxprim/loaders/Makefile @@ -3,6 +3,9 @@ LIBNAME=loaders INCLUDE=core include $(TOPDIR)/pre.mk + +LDLIBS+=$(LDLIBS_LOADERS) + include $(TOPDIR)/pywrap.mk $(SWIG_C): ../common.i diff --git a/pywrap.mk b/pywrap.mk index 9b4fcba..70bc835 100644 --- a/pywrap.mk +++ b/pywrap.mk @@ -32,10 +32,10 @@ endif # VERBOSE $(SWIG_LIB): $(SWIG_C) ifdef VERBOSE - $(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) $(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@ + $(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) $(PYTHON_INCLUDE) --shared $(LDLIBS_GP) $(LDLIBS) -L$(TOPDIR)/build/ -o $@ else # VERBOSE @echo "LD $@" - @$(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) $(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@ + @$(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) $(PYTHON_INCLUDE) --shared $(LDLIBS_GP) $(LDLIBS) -L$(TOPDIR)/build/ -o $@ endif # VERBOSE # Install python libraries into right places diff --git a/tests/Makefile b/tests/Makefile index 71b1004..6eb167d 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,7 +1,7 @@ TOPDIR=.. include $(TOPDIR)/pre.mk -SUBDIRS=core drivers framework loaders gfx filters +SUBDIRS=core framework loaders gfx filters loaders: framework gfx: framework diff --git a/tests/framework/Makefile b/tests/framework/Makefile index 44ed5e1..bc04fc1 100644 --- a/tests/framework/Makefile +++ b/tests/framework/Makefile @@ -5,7 +5,7 @@ CSOURCES=$(shell echo *.c) INCLUDE= LDFLAGS+=-L. -LDLIBS+=-ltst_preload -ldl -ltst -lrt +LDLIBS+=-ltst_preload -lm -ldl -ltst -lrt CFLAGS+= test: libtst.a
http://repo.or.cz/w/gfxprim.git/commit/f7b1bfa7d24c44f3e03e6d3e8f20fe5d8399…
commit f7b1bfa7d24c44f3e03e6d3e8f20fe5d839964bd Author: Cyril Hrubis <metan(a)ucw.cz> Date: Fri May 3 13:29:21 2013 +0200 backends,input: Move Input drivers to backends. * These require linking against corresponding libraries and belong to the backends anyway. Signed-off-by: Cyril Hrubis <metan(a)ucw.cz> diff --git a/libs/input/GP_InputDriverSDL.c b/libs/backends/GP_InputDriverSDL.c similarity index 99% rename from libs/input/GP_InputDriverSDL.c rename to libs/backends/GP_InputDriverSDL.c index aa3176b..d94272d 100644 --- a/libs/input/GP_InputDriverSDL.c +++ b/libs/backends/GP_InputDriverSDL.c @@ -28,7 +28,7 @@ #include "core/GP_Debug.h" #include "input/GP_EventQueue.h" -#include "input/GP_InputDriverSDL.h" +#include "GP_InputDriverSDL.h" /* SDL ascii mapped keys */ static uint16_t keysym_table1[] = { diff --git a/include/input/GP_InputDriverSDL.h b/libs/backends/GP_InputDriverSDL.h similarity index 100% rename from include/input/GP_InputDriverSDL.h rename to libs/backends/GP_InputDriverSDL.h diff --git a/libs/input/GP_InputDriverX11.c b/libs/backends/GP_InputDriverX11.c similarity index 100% rename from libs/input/GP_InputDriverX11.c rename to libs/backends/GP_InputDriverX11.c diff --git a/include/input/GP_InputDriverX11.h b/libs/backends/GP_InputDriverX11.h similarity index 100% rename from include/input/GP_InputDriverX11.h rename to libs/backends/GP_InputDriverX11.h diff --git a/libs/backends/GP_SDL.c b/libs/backends/GP_SDL.c index a4599ac..4dcfeb3 100644 --- a/libs/backends/GP_SDL.c +++ b/libs/backends/GP_SDL.c @@ -29,8 +29,8 @@ #ifdef HAVE_LIBSDL -#include "input/GP_InputDriverSDL.h" #include "input/GP_Input.h" +#include "GP_InputDriverSDL.h" #include "GP_Backend.h" #include "GP_SDL.h" diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c index c81f0dd..0ef7512 100644 --- a/libs/backends/GP_X11.c +++ b/libs/backends/GP_X11.c @@ -41,7 +41,7 @@ #include <X11/extensions/XShm.h> #endif /* HAVE_X_SHM */ -#include "input/GP_InputDriverX11.h" +#include "GP_InputDriverX11.h" #include "backends/GP_X11.h"
http://repo.or.cz/w/gfxprim.git/commit/0dcd3ddb50bb7ee9fab8ed8b4a21bb9a909d…
commit 0dcd3ddb50bb7ee9fab8ed8b4a21bb9a909d4940 Author: Cyril Hrubis <metan(a)ucw.cz> Date: Fri May 3 13:23:12 2013 +0200 demos: c_simple: Fix segfault when x11 not compiled in * This fixes segfault when we are not able to initialize X11 backend. * Also changes GP_BackendExit() to be no-op for NULL pointer. Signed-off-by: Cyril Hrubis <metan(a)ucw.cz> diff --git a/demos/c_simple/x11_windows.c b/demos/c_simple/x11_windows.c index 2c77075..7ed43e4 100644 --- a/demos/c_simple/x11_windows.c +++ b/demos/c_simple/x11_windows.c @@ -89,6 +89,12 @@ int main(void) win_1 = GP_BackendX11Init(NULL, 0, 0, 300, 300, "win 1", 0); win_2 = GP_BackendX11Init(NULL, 0, 0, 300, 300, "win 2", 0); + if (win_1 == NULL || win_2 == NULL) { + GP_BackendExit(win_1); + GP_BackendExit(win_2); + return 1; + } + /* Update the backend screen */ redraw(win_1->context); redraw(win_2->context); diff --git a/include/backends/GP_Backend.h b/include/backends/GP_Backend.h index 02c5b29..712f156 100644 --- a/include/backends/GP_Backend.h +++ b/include/backends/GP_Backend.h @@ -173,7 +173,8 @@ static inline void GP_BackendUpdateRectXYWH(GP_Backend *backend, */ static inline void GP_BackendExit(GP_Backend *backend) { - backend->Exit(backend); + if (backend) + backend->Exit(backend); } /*
http://repo.or.cz/w/gfxprim.git/commit/2b791b83c7976635a33543e76e1259c5dfb6…
commit 2b791b83c7976635a33543e76e1259c5dfb6454c Author: Cyril Hrubis <metan(a)ucw.cz> Date: Fri May 3 14:17:10 2013 +0200 doc: Update compilation & installation docs. Signed-off-by: Cyril Hrubis <metan(a)ucw.cz> diff --git a/doc/compilation.txt b/doc/compilation.txt index cb025e0..1ae82f6 100644 --- a/doc/compilation.txt +++ b/doc/compilation.txt @@ -39,7 +39,7 @@ Compilation ~~~~~~~~~~~ Once devel packages are installed the compilation is as simple as running -'configure' and 'make'. ++configure+ and +make+. NOTE: The 'configure' script is written in 'Python'. @@ -60,18 +60,21 @@ TIP: GFXprim supports proper parallel build, you most likely want to add gfxprim # make install ------------------------------------------------------------------------------- -The 'make install' command will install GFXprim libraries and devel headers -into your system. Python bindings are not installable at the moment. +The +make install+ command will install GFXprim libraries and devel headers +into your system. -OpenSUSE -~~~~~~~~ +OpenSUSE & Fedora +~~~~~~~~~~~~~~~~~ Instruction to install required packages on
link:http://www.opensuse.org/[OpenSUSE]
. +Works for
link:http://www.fedoraproject.org/[Fedora]
too if you substitute ++zypper in+ with +yum install+. + .Install basic tools ------------------------------------------------------------------------------- -zypper in gcc make python-Jinja2 +zypper in gcc make python-jinja2 ------------------------------------------------------------------------------- .Install jpeg and png devel libraries ----------------------------------------------------------------------- Summary of changes: app.mk | 6 +-- build/get_objs.sh | 2 +- config.mk | 7 ++++ configure | 20 ++++++----- demos/bogoman/Makefile | 3 +- demos/c_simple/Makefile | 35 +++++++++++++++++-- demos/c_simple/x11_windows.c | 6 +++ demos/grinder/Makefile | 8 ++-- demos/spiv/Makefile | 4 ++- demos/ttf2img/Makefile | 3 +- doc/compilation.txt | 15 +++++--- include/backends/GP_Backend.h | 3 +- libs/{input => backends}/GP_InputDriverSDL.c | 2 +- .../input => libs/backends}/GP_InputDriverSDL.h | 0 libs/{input => backends}/GP_InputDriverX11.c | 0 .../input => libs/backends}/GP_InputDriverX11.h | 0 libs/backends/GP_SDL.c | 2 +- libs/backends/GP_X11.c | 2 +- libs/loaders/Makefile | 1 + pylib/gfxprim/backends/Makefile | 4 +- pylib/gfxprim/grabbers/Makefile | 5 ++- pylib/gfxprim/loaders/Makefile | 3 ++ pywrap.mk | 4 +- tests/Makefile | 2 +- tests/framework/Makefile | 2 +- 25 files changed, 95 insertions(+), 44 deletions(-) rename libs/{input => backends}/GP_InputDriverSDL.c (99%) rename {include/input => libs/backends}/GP_InputDriverSDL.h (100%) rename libs/{input => backends}/GP_InputDriverX11.c (100%) rename {include/input => libs/backends}/GP_InputDriverX11.h (100%) repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive no reply. -- gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
1
0
0
0
← Newer
1
2
3
4
Older →
Jump to page:
1
2
3
4
Results per page:
10
25
50
100
200