diff --git a/ChangeLog b/ChangeLog index 577ab4ce5..48fa8768c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,52 @@ +2008-11-10 Robert Bragg + + Bug 1164 - Implements the proposed Mesh API + + * clutter/cogl/cogl-mesh.h + * clutter/cogl/cogl-types.h + * clutter/cogl/cogl.h.in + * clutter/cogl/common/Makefile.am + * clutter/cogl/common/cogl-mesh-private.h + * clutter/cogl/common/cogl-mesh.c + * clutter/cogl/gl/cogl-context.c + * clutter/cogl/gl/cogl-context.h + * clutter/cogl/gl/cogl-defines.h.in + * clutter/cogl/gl/cogl.c + * clutter/cogl/gles/cogl-context.c + * clutter/cogl/gles/cogl-context.h: + The Mesh API provides a means for submitting an extensible number of + per vertex attributes to OpenGL in a way that doesn't require format + conversions and so that the data can be mapped into the GPU (in vertex + buffer objects) for - hopefully - fast re-use. + + There are a number of things we can potentially use this API for, but + right now this just provides a foundation to build on. Please read + the extensive list of TODO items in cogl-mesh.c for examples. + + Please refer to the cogl-mesh section in the reference manual for + documentation of the API. + + * tests/conform/Makefile.am + * tests/conform/test-conform-main.c + * tests/conform/test-mesh-contiguous.c + * tests/conform/test-mesh-interleved.c + * tests/conform/test-mesh-mutability.c: + Privides basic coverage testing for the mesh API. + +2008-11-10 Robert Bragg + + * tests/conform/ADDING_NEW_TESTS + * tests/conform/test-conform-common.c + * tests/conform/test-pick.c: + Instead of using clutter_stage_new /clutter_actor_destroy as a way to + avoid cascading side effects between unit tests, due to left over + actors, we now destroy all children of the default stage between + tests instead. + + * tests/conform/wrapper.sh: + Adds a convenience note about how to run valgrind for an individual + unit test + 2008-11-10 Neil Roberts * tests/interactive/test-main.c (main): Allow more than two diff --git a/tests/conform/ADDING_NEW_TESTS b/tests/conform/ADDING_NEW_TESTS index 738746788..dbea8094e 100644 --- a/tests/conform/ADDING_NEW_TESTS +++ b/tests/conform/ADDING_NEW_TESTS @@ -27,5 +27,5 @@ Don't call clutter_init since that is handled in test-conform-common.c Make sure you clean up *everything* you create. Noteable things you might miss include timelines, behaviours, and all actors you add to the stage. This is important because otherwise you can cause cascading failures in other tests. -Use stage = clutter_stage_new () with a corresponding clutter_actor_destroy instead of clutter_stage_get_default (). +Be aware that to help avoid tests causing cascading side effects for other tests all children of the default stage are destroyed between tests. diff --git a/tests/conform/test-conform-common.c b/tests/conform/test-conform-common.c index 3fcd234f0..e44648772 100644 --- a/tests/conform/test-conform-common.c +++ b/tests/conform/test-conform-common.c @@ -11,7 +11,20 @@ void test_conform_simple_fixture_setup (TestConformSimpleFixture *fixture, gconstpointer data) { - /* const TestConformSharedState *shared_state = data; */ + /* const TestConformSharedState *shared_state = data; */ + ClutterActor *stage = clutter_stage_get_default (); + GList *actors = clutter_container_get_children (CLUTTER_CONTAINER (stage)); + GList *tmp; + + /* To help reduce leakage between unit tests, we destroy all children of the stage */ + for (tmp = actors; tmp != NULL; tmp = tmp->next) + { + ClutterActor *leaked_actor = tmp->data; + + if (g_test_verbose ()) + g_print ("Freeing leaked actor %p\n", leaked_actor); + clutter_actor_destroy (leaked_actor); + } } diff --git a/tests/conform/test-pick.c b/tests/conform/test-pick.c index e40c767ce..965bc24e6 100644 --- a/tests/conform/test-pick.c +++ b/tests/conform/test-pick.c @@ -71,7 +71,7 @@ test_pick (TestConformSimpleFixture *fixture, state.pass = TRUE; - state.stage = clutter_stage_new (); + state.stage = clutter_stage_get_default (); clutter_actor_set_size (state.stage, STAGE_WIDTH, STAGE_HEIGHT); state.actor_width = STAGE_WIDTH / ACTORS_X; @@ -100,7 +100,6 @@ test_pick (TestConformSimpleFixture *fixture, clutter_main (); - clutter_actor_destroy (state.stage); if (g_test_verbose ()) g_print ("end result: %s\n", state.pass ? "FAIL" : "pass"); diff --git a/tests/conform/wrapper.sh b/tests/conform/wrapper.sh index d9a775307..082a9fd96 100755 --- a/tests/conform/wrapper.sh +++ b/tests/conform/wrapper.sh @@ -12,4 +12,7 @@ echo "NOTE: For debugging purposes, you can run this single test as follows:" echo "$ libtool --mode=execute \\" echo " gdb --eval-command=\"b $UNIT_TEST\" \\" echo " --args ./test-conformance -p $UNIT_TEST_PATH" - +echo "or:" +echo "$ env G_SLICE=always-malloc \\" +echo " libtool --mode=execute \\" +echo " valgrind ./test-conformance -p $UNIT_TEST_PATH"