diff --git a/libweston/vertex-clipping.c b/libweston/vertex-clipping.c index a71e7336..3a05c7bd 100644 --- a/libweston/vertex-clipping.c +++ b/libweston/vertex-clipping.c @@ -26,9 +26,10 @@ #include #include +#include "shared/helpers.h" #include "vertex-clipping.h" -float +WESTON_EXPORT_FOR_TESTS float float_difference(float a, float b) { /* http://www.altdevblogaday.com/2012/02/22/comparing-floating-point-numbers-2012-edition/ */ @@ -282,7 +283,7 @@ clip_polygon_bottom(struct clip_context *ctx, const struct polygon8 *src, #define min(a, b) (((a) > (b)) ? (b) : (a)) #define clip(x, a, b) min(max(x, a), b) -int +WESTON_EXPORT_FOR_TESTS int clip_simple(struct clip_context *ctx, struct polygon8 *surf, float *ex, @@ -296,7 +297,7 @@ clip_simple(struct clip_context *ctx, return surf->n; } -int +WESTON_EXPORT_FOR_TESTS int clip_transformed(struct clip_context *ctx, struct polygon8 *surf, float *ex, diff --git a/tests/meson.build b/tests/meson.build index 222091cd..5b1f0418 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -204,10 +204,6 @@ tests = [ input_timestamps_unstable_v1_protocol_c, ], }, - { - 'name': 'vertex-clip', - 'dep_objs': dep_vertex_clipping, - }, { 'name': 'viewporter', }, { 'name': 'viewporter-shot', }, { @@ -227,6 +223,14 @@ tests = [ }, ] +if get_option('renderer-gl') + tests += { + 'name': 'vertex-clip', + 'link_with': plugin_gl, + } + +endif + if get_option('color-management-lcms') dep_lcms2 = dependency('lcms2', version: '>= 2.9', required: false) if not dep_lcms2.found() @@ -338,6 +342,7 @@ foreach t : tests build_by_default: true, include_directories: common_inc, dependencies: t_deps, + link_with: t.get('link_with', []), install: false, )