summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vega/vg_manager.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2010-04-24 01:05:49 +0100
committerJakob Bornecrantz <[email protected]>2010-04-26 00:40:17 +0100
commit0c572c6828b6a338b07a6860280b3a314a81662e (patch)
tree749dc6f81128f7a1b16953fad240f53108b4f8a4 /src/gallium/state_trackers/vega/vg_manager.c
parent81ab19de04e623d24cb65ad1ed3b240bce78235b (diff)
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.
Diffstat (limited to 'src/gallium/state_trackers/vega/vg_manager.c')
-rw-r--r--src/gallium/state_trackers/vega/vg_manager.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c
index e4226754d13..aecac28e7ee 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,
-};