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, generate-waf has been updated
via 3d26fff40a37aee0793346004846b5911d901f3c (commit)
from ee1abb0bacc0c86b382685d521ab6828efa4af0f (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/3d26fff40a37aee0793346004846b5911d90…
commit 3d26fff40a37aee0793346004846b5911d901f3c
Author: Tomas Gavenciak <gavento(a)ucw.cz>
Date: Fri Aug 26 11:52:23 2011 +0200
Fix rebuilding
diff --git a/wscript b/wscript
index e2d1805..9d52c4a 100644
--- a/wscript
+++ b/wscript
@@ -40,7 +40,7 @@ def configure(cnf):
def build(bld):
# Generate all generated headers, regardless of the module
include = bld.path.find_node('include')
- bld.template(source=include.ant_glob('**/*.h.t'), in_src=True)
+ bld.template(source=include.ant_glob('**/*.h.t'), in_src=True, update_outputs=True)
bld.add_group()
# Recurse on modules
uses = []
-----------------------------------------------------------------------
Summary of changes:
wscript | 2 +-
1 files changed, 1 insertions(+), 1 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.")
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, generate-waf has been updated
via ee1abb0bacc0c86b382685d521ab6828efa4af0f (commit)
from bc6e962ae2c0418d82e47e7f10601352679a041f (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/ee1abb0bacc0c86b382685d521ab6828efa4…
commit ee1abb0bacc0c86b382685d521ab6828efa4af0f
Author: Tomas Gavenciak <gavento(a)ucw.cz>
Date: Fri Aug 26 11:35:57 2011 +0200
Fig parallel build
diff --git a/wscript b/wscript
index 25cae62..e2d1805 100644
--- a/wscript
+++ b/wscript
@@ -41,6 +41,7 @@ def build(bld):
# Generate all generated headers, regardless of the module
include = bld.path.find_node('include')
bld.template(source=include.ant_glob('**/*.h.t'), in_src=True)
+ bld.add_group()
# Recurse on modules
uses = []
for mod in 'core gfx text loaders filters input backends SDL'.split():
diff --git a/wscript_lib.py b/wscript_lib.py
index fa9c4df..1dc353e 100644
--- a/wscript_lib.py
+++ b/wscript_lib.py
@@ -84,9 +84,7 @@ class GitCheck(GitDist, DistCheck):
ext_algo = {}
def execute(self):
self.recurse([os.path.dirname(Context.g_module.root_path)])
- Logs.info('A0')
self.git_archive()
- Logs.info('A1')
self.check()
-----------------------------------------------------------------------
Summary of changes:
wscript | 1 +
wscript_lib.py | 2 --
2 files changed, 1 insertions(+), 2 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.")
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, generate has been updated
via ce1f7e60318bc537190107fef5834338da94706d (commit)
from 8a3762309b457c34c0da176d12b3bc76e2f486e9 (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/ce1f7e60318bc537190107fef5834338da94…
commit ce1f7e60318bc537190107fef5834338da94706d
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Aug 21 12:03:08 2011 +0200
Small fixes for WritePixel test.
diff --git a/tests/core/GP_WritePixel.test.gen.c.t b/tests/core/GP_WritePixel.test.gen.c.t
index 902a8b7..2661371 100644
--- a/tests/core/GP_WritePixel.test.gen.c.t
+++ b/tests/core/GP_WritePixel.test.gen.c.t
@@ -11,12 +11,16 @@ static void dump_buffer(const char *name, char *buf, unsigned int buf_len)
{
unsigned int i;
- printf("%s = {", name);
+ printf("%s:n{", name);
for (i = 0; i < buf_len; i++) {
- printf("0x%02x", buf[i]);
+ printf("%i", !!buf[i]);
+
if (i != buf_len - 1)
printf(", ");
+
+ if (i % 26 == 25)
+ printf("n ");
}
printf("}n");
@@ -25,7 +29,7 @@ static void dump_buffer(const char *name, char *buf, unsigned int buf_len)
/*
* Compares two statically defined buffers
*/
-#define COMPARE_BUFFERS(buf1, buf2) do { +#define COMPARE_BUFFERS(id, buf1, buf2) do { unsigned int buf1_len = sizeof(buf1)/sizeof(*buf1); unsigned int buf2_len = sizeof(buf2)/sizeof(*buf2); unsigned int i; @@ -33,21 +37,22 @@ static void dump_buffer(const char *name, char *buf, unsigned int buf_len)
fail_unless(buf1_len == buf2_len); for (i = 0; i < buf1_len; i++) - if(buf1[i] != buf2[i]) { - dump_buffer("write", buf1, buf1_len); - dump_buffer("gen ", buf2, buf2_len); + if(buf1[i] != buf2[i]) { + printf("%sn", id); + dump_buffer("wrote", buf1, buf1_len); + dump_buffer("gen", buf2, buf2_len); fail("buffers are different"); } } while (0)
%% for pixelsize in [8, 16, 24, 32]
%% for offset in range(0, 4)
-%% for len in range(0, 4)
+%% for len in range(0, 6)
%% for aligment in [0, 1]
GP_TEST(GP_WritePixel{{ "%i_%i_%i_%i"|format(pixelsize, offset, len, aligment) }}, {{ ""offset=%i len=%i aligment=%i""|format(offset, len, aligment) }})
{
- char write_buf[{{ 9 * pixelsize//8 }}] = {};
- char gen_buf[{{9 * pixelsize//8 }}] = {};
+ char write_buf[{{ 25 * pixelsize//8 }}] = {};
+ char gen_buf[{{ 25 * pixelsize//8 }}] = {};
/*
* Fill the compare buffer
@@ -60,7 +65,7 @@ GP_TEST(GP_WritePixel{{ "%i_%i_%i_%i"|format(pixelsize, offset, len, aligment) }
GP_WritePixels{{ pixelsize }}bpp(write_buf + {{aligment + offset * pixelsize//8}}, {{ len }}, 0xffffffff>>{{32 - pixelsize}});
- COMPARE_BUFFERS(write_buf, gen_buf);
+ COMPARE_BUFFERS({{""p=%i o=%i l=%i a=%i""|format(pixelsize, offset, len, aligment)}}, write_buf, gen_buf);
}
GP_ENDTEST
%% endfor
-----------------------------------------------------------------------
Summary of changes:
tests/core/GP_WritePixel.test.gen.c.t | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 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.")
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, generate has been updated
via 8a3762309b457c34c0da176d12b3bc76e2f486e9 (commit)
from 4d23481d197e7e0187bff3b2e9002d76d96497bb (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/8a3762309b457c34c0da176d12b3bc76e2f4…
commit 8a3762309b457c34c0da176d12b3bc76e2f486e9
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Aug 21 11:34:47 2011 +0200
Quick and dirty tests for GP_WritePixel (byte aligned pixels only).
diff --git a/tests/core/GP_WritePixel.test.gen.c.t b/tests/core/GP_WritePixel.test.gen.c.t
new file mode 100644
index 0000000..902a8b7
--- /dev/null
+++ b/tests/core/GP_WritePixel.test.gen.c.t
@@ -0,0 +1,71 @@
+%% extends "base.test.c.t"
+
+%% block body
+#include "GP_Tests.h"
+#include "GP_WritePixel.h"
+#include "GP_TestingCore.h"
+
+GP_SUITE(GP_WritePixel)
+
+static void dump_buffer(const char *name, char *buf, unsigned int buf_len)
+{
+ unsigned int i;
+
+ printf("%s = {", name);
+
+ for (i = 0; i < buf_len; i++) {
+ printf("0x%02x", buf[i]);
+ if (i != buf_len - 1)
+ printf(", ");
+ }
+
+ printf("}n");
+}
+
+/*
+ * Compares two statically defined buffers
+ */
+#define COMPARE_BUFFERS(buf1, buf2) do { + unsigned int buf1_len = sizeof(buf1)/sizeof(*buf1); + unsigned int buf2_len = sizeof(buf2)/sizeof(*buf2); + unsigned int i; + + fail_unless(buf1_len == buf2_len); + + for (i = 0; i < buf1_len; i++) + if(buf1[i] != buf2[i]) { + dump_buffer("write", buf1, buf1_len); + dump_buffer("gen ", buf2, buf2_len); + fail("buffers are different"); + } +} while (0)
+
+%% for pixelsize in [8, 16, 24, 32]
+%% for offset in range(0, 4)
+%% for len in range(0, 4)
+%% for aligment in [0, 1]
+GP_TEST(GP_WritePixel{{ "%i_%i_%i_%i"|format(pixelsize, offset, len, aligment) }}, {{ ""offset=%i len=%i aligment=%i""|format(offset, len, aligment) }})
+{
+ char write_buf[{{ 9 * pixelsize//8 }}] = {};
+ char gen_buf[{{9 * pixelsize//8 }}] = {};
+
+ /*
+ * Fill the compare buffer
+ */
+%% for i in range(0, len)
+%% for j in range(0, pixelsize//8)
+ gen_buf[{{aligment + offset * pixelsize//8 + i * pixelsize//8 + j}}] = 0xff;
+%% endfor
+%% endfor
+
+ GP_WritePixels{{ pixelsize }}bpp(write_buf + {{aligment + offset * pixelsize//8}}, {{ len }}, 0xffffffff>>{{32 - pixelsize}});
+
+ COMPARE_BUFFERS(write_buf, gen_buf);
+}
+GP_ENDTEST
+%% endfor
+%% endfor
+%% endfor
+%% endfor
+
+%% endblock body
diff --git a/tests/core/Makefile b/tests/core/Makefile
index c03633a..00e696e 100644
--- a/tests/core/Makefile
+++ b/tests/core/Makefile
@@ -3,7 +3,7 @@ TOPDIR=../..
LIBNAME=core
TESTSUITE=core_suite
LDLIBS+=-lGP -L$(TOPDIR)/build/ -lcheck
-GENSOURCES+=GP_Convert.test.gen.c
+GENSOURCES+=GP_Convert.test.gen.c GP_WritePixel.test.gen.c
include $(TOPDIR)/tests.mk
include $(TOPDIR)/include.mk
-----------------------------------------------------------------------
Summary of changes:
tests/core/GP_WritePixel.test.gen.c.t | 71 +++++++++++++++++++++++++++++++++
tests/core/Makefile | 2 +-
2 files changed, 72 insertions(+), 1 deletions(-)
create mode 100644 tests/core/GP_WritePixel.test.gen.c.t
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.")
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, generate has been updated
via 4d23481d197e7e0187bff3b2e9002d76d96497bb (commit)
from 01aaa35ef40df33f0153ec4431b683af7da56a2a (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/4d23481d197e7e0187bff3b2e9002d76d964…
commit 4d23481d197e7e0187bff3b2e9002d76d96497bb
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Aug 21 01:11:17 2011 +0200
Added 8-8-4 palette colors.
diff --git a/libs/core/GP_Color.c b/libs/core/GP_Color.c
index 06a2791..672089e 100644
--- a/libs/core/GP_Color.c
+++ b/libs/core/GP_Color.c
@@ -58,11 +58,29 @@ static uint8_t rgb888_colors[][3] = {
{0xff, 0xff, 0xff}, /* White */
};
+/* 8-8-4 RGB palette */
+static uint8_t p8_colors[] = {
+ 0x00, /* Black */
+ 0xe0, /* Red */
+ 0x1c, /* Green */
+ 0x03, /* Blue */
+ 0xfc, /* Yellow */
+ 0x88, /* Brown */
+ 0xf0, /* Orange */
+ 0x49, /* DarkGray */
+ 0x92, /* LightGray */
+ 0x8a, /* Purple */
+ 0xff, /* White */
+};
+
GP_Pixel GP_ColorToPixel(GP_Context *context, GP_Color col)
{
GP_ASSERT(col < GP_COL_MAX);
GP_ASSERT(col >= 0);
+ if (context->pixel_type == GP_PIXEL_P8)
+ return p8_colors[col];
+
return GP_RGBToPixel(rgb888_colors[col][0],
rgb888_colors[col][1],
rgb888_colors[col][2], context->pixel_type);
-----------------------------------------------------------------------
Summary of changes:
libs/core/GP_Color.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 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.")
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, generate has been updated
via 01aaa35ef40df33f0153ec4431b683af7da56a2a (commit)
from 9e8793ceec06e0c006747c33770bc6e4b19324a6 (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/01aaa35ef40df33f0153ec4431b683af7da5…
commit 01aaa35ef40df33f0153ec4431b683af7da56a2a
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sat Aug 20 23:39:23 2011 +0200
Fixed WritePixels24().
diff --git a/libs/core/GP_WritePixel.c b/libs/core/GP_WritePixel.c
index 182a42e..090cb5c 100644
--- a/libs/core/GP_WritePixel.c
+++ b/libs/core/GP_WritePixel.c
@@ -236,6 +236,7 @@ void GP_WritePixels24bpp(void *start, size_t count, uint32_t value)
block[1] = bcab;
block[2] = cabc;
p = (uint32_t *)(bytep + 3);
+ i--;
break;
}
@@ -262,11 +263,13 @@ void GP_WritePixels24bpp(void *start, size_t count, uint32_t value)
case 2:
bytep[0] = c;
bytep++;
+ i--;
break;
case 3:
bytep[0] = b;
bytep[1] = c;
bytep += 2;
+ i--;
break;
}
-----------------------------------------------------------------------
Summary of changes:
libs/core/GP_WritePixel.c | 3 +++
1 files changed, 3 insertions(+), 0 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.")
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, generate has been updated
via 9e8793ceec06e0c006747c33770bc6e4b19324a6 (commit)
from 7fc258147bf9b322a730cd1bc426bee0b668f8f5 (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/9e8793ceec06e0c006747c33770bc6e4b193…
commit 9e8793ceec06e0c006747c33770bc6e4b19324a6
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sat Aug 20 23:09:53 2011 +0200
Unbreak the testsuite.
diff --git a/pylib/templates/collected_tests.c.t b/pylib/templates/collected_tests.c.t
index cd24232..0241a28 100644
--- a/pylib/templates/collected_tests.c.t
+++ b/pylib/templates/collected_tests.c.t
@@ -21,7 +21,7 @@ Code creating the tests and suites for tests collected from .test.c files.
void GP_TEST_{{ t['name'] }}(int);
-## TODO: Handle special test requirements (timing, fixture, ...)
+// TODO: Handle special test requirements (timing, fixture, ...)
TCase *GP_TC_{{ suite }}_{{ t['name'] }}()
{
TCase *tc = tcase_create("{{ t['name'] }}");
diff --git a/tests/core/GP_Convert.test.c b/tests/core/GP_Convert.test.c
index 19e8f9d..28bd28a 100644
--- a/tests/core/GP_Convert.test.c
+++ b/tests/core/GP_Convert.test.c
@@ -19,9 +19,9 @@ GP_TEST(BasicPixelConversions)
fail_unless(p1 == 0x123456);
GP_CHECK_EqualColors(p1, GP_PIXEL_RGB888, p1, GP_PIXEL_RGB888);
- p1 = GP_RGB888ToPixel(GP_RGBToPixel(0x12, 0x34, 0x56, GP_PIXEL_RGB888), GP_PIXEL_V4);
- p2 = GP_RGBAToPixel(0x12, 0x34, 0x56, 0x78, GP_PIXEL_V2);
- GP_CHECK_EqualColors(p1, GP_PIXEL_V4, p2, GP_PIXEL_V2);
+ p1 = GP_RGB888ToPixel(GP_RGBToPixel(0x12, 0x34, 0x56, GP_PIXEL_RGB888), GP_PIXEL_G4);
+ p2 = GP_RGBAToPixel(0x12, 0x34, 0x56, 0x78, GP_PIXEL_G2);
+ GP_CHECK_EqualColors(p1, GP_PIXEL_G4, p2, GP_PIXEL_G2);
}
GP_ENDTEST
-----------------------------------------------------------------------
Summary of changes:
pylib/templates/collected_tests.c.t | 2 +-
tests/core/GP_Convert.test.c | 6 +++---
2 files changed, 4 insertions(+), 4 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.")