From 0c572c6828b6a338b07a6860280b3a314a81662e Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sat, 24 Apr 2010 01:05:49 +0100 Subject: st_api: Remove st_module The struct st_module isn't needed as it is the same thing as the st_api struct. That is they both represent the API. Instead just use a single function entry point to the the API. --- src/gallium/state_trackers/vega/vg_manager.c | 33 ++++++++++------------------ 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'src/gallium/state_trackers/vega') diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c index e4226754d1..aecac28e7e 100644 --- a/src/gallium/state_trackers/vega/vg_manager.c +++ b/src/gallium/state_trackers/vega/vg_manager.c @@ -546,26 +546,17 @@ vg_api_destroy(struct st_api *stapi) free(stapi); } -static struct st_api * -vg_module_create_api(void) -{ - struct st_api *stapi; - - stapi = CALLOC_STRUCT(st_api); - if (stapi) { - stapi->destroy = vg_api_destroy; - stapi->get_proc_address = vg_api_get_proc_address; - stapi->is_visual_supported = vg_api_is_visual_supported; - - stapi->create_context = vg_api_create_context; - stapi->make_current = vg_api_make_current; - stapi->get_current = vg_api_get_current; - } +struct st_api st_vg_api = { + vg_api_destroy, + vg_api_get_proc_address, + vg_api_is_visual_supported, + vg_api_create_context, + vg_api_make_current, + vg_api_get_current, +}; - return stapi; +struct st_api * +st_api_create_OpenVG(void) +{ + return &st_vg_api; } - -PUBLIC const struct st_module st_module_OpenVG = { - .api = ST_API_OPENVG, - .create_api = vg_module_create_api, -}; -- cgit v1.2.3