summaryrefslogtreecommitdiff
path: root/tests/conform
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2013-04-28 03:22:24 +0100
committerRobert Bragg <robert@linux.intel.com>2013-06-12 11:55:26 +0100
commit8aadfd829239534fb4ec8255cdea813d698c5a3f (patch)
tree169745e21dba4d666d16b640cfd908600e204b94 /tests/conform
parent8495d9c1c15ce389885a9356d965eabd97758115 (diff)
downloadcogl-8aadfd829239534fb4ec8255cdea813d698c5a3f.tar.gz
Separate out CoglPath api into sub-library
This splits out the cogl_path_ api into a separate cogl-path sub-library like cogl-pango and cogl-gst. This enables developers to build Cogl with this sub-library disabled if they don't need it which can be useful when its important to keep the size of an application and its dependencies down to a minimum. The functions cogl_framebuffer_{fill,stroke}_path have been renamed to cogl_path_{fill,stroke}. There were a few places in core cogl and cogl-gst that referenced the CoglPath api and these have been decoupled by using the CoglPrimitive api instead. In the case of cogl_framebuffer_push_path_clip() the core clip stack no longer accepts path clips directly but it's now possible to get a CoglPrimitive for the fill of a path and so the implementation of cogl_framebuffer_push_path_clip() now lives in cogl-path and works as a shim that first gets a CoglPrimitive and uses cogl_framebuffer_push_primitive_clip instead. We may want to consider renaming cogl_framebuffer_push_path_clip to put it in the cogl_path_ namespace. Reviewed-by: Neil Roberts <neil@linux.intel.com>
Diffstat (limited to 'tests/conform')
-rw-r--r--tests/conform/Makefile.am8
-rw-r--r--tests/conform/test-conform-main.c2
-rw-r--r--tests/conform/test-path.c3
3 files changed, 11 insertions, 2 deletions
diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am
index d57c8e59..46d58dcc 100644
--- a/tests/conform/Makefile.am
+++ b/tests/conform/Makefile.am
@@ -32,7 +32,6 @@ test_sources = \
test-color-mask.c \
test-backface-culling.c \
test-just-vertex-shader.c \
- test-path.c \
test-pipeline-uniforms.c \
test-pixel-buffer.c \
test-premult.c \
@@ -73,6 +72,10 @@ if !USING_EMSCRIPTEN
test_sources += test-fence.c
endif
+if BUILD_COGL_PATH
+test_sources += test-path.c
+endif
+
test_conformance_SOURCES = $(common_sources) $(test_sources)
if OS_WIN32
@@ -142,6 +145,9 @@ test_conformance_LDADD = \
if !USE_GLIB
test_conformance_LDADD += $(top_builddir)/deps/glib/libglib.la
endif
+if BUILD_COGL_PATH
+test_conformance_LDADD += $(top_builddir)/cogl-path/libcogl-path.la
+endif
test_conformance_LDFLAGS = -export-dynamic
test: wrappers
diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c
index ca2525d7..78ce81fc 100644
--- a/tests/conform/test-conform-main.c
+++ b/tests/conform/test-conform-main.c
@@ -56,7 +56,9 @@ main (int argc, char **argv)
ADD_TEST (test_blend, 0, 0);
ADD_TEST (test_premult, 0, 0);
UNPORTED_TEST (test_readpixels);
+#ifdef COGL_HAS_COGL_PATH_SUPPORT
ADD_TEST (test_path, 0, 0);
+#endif
ADD_TEST (test_depth_test, 0, 0);
ADD_TEST (test_color_mask, 0, 0);
ADD_TEST (test_backface_culling, 0, 0);
diff --git a/tests/conform/test-path.c b/tests/conform/test-path.c
index bf1e2679..01cee551 100644
--- a/tests/conform/test-path.c
+++ b/tests/conform/test-path.c
@@ -1,4 +1,5 @@
#include <cogl/cogl.h>
+#include <cogl-path/cogl-path.h>
#include <string.h>
@@ -20,7 +21,7 @@ draw_path_at (CoglPath *path, CoglPipeline *pipeline, int x, int y)
cogl_framebuffer_push_matrix (test_fb);
cogl_framebuffer_translate (test_fb, x * BLOCK_SIZE, y * BLOCK_SIZE, 0.0f);
- cogl_framebuffer_fill_path (test_fb, pipeline, path);
+ cogl_path_fill (path, test_fb, pipeline);
cogl_framebuffer_pop_matrix (test_fb);
}