From f66a4e20c19d55005854bbee312947ec16e287e3 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 17 Jun 2010 23:21:43 +0800 Subject: st/egl: Introduce native_platform. Move native_get_name, native_create_probe, native_get_probe_result, and native_create_display into struct native_platform, and add native_get_platform to get a handle to the struct. --- src/gallium/state_trackers/egl/gdi/native_gdi.c | 33 +++++++++++-------------- 1 file changed, 14 insertions(+), 19 deletions(-) (limited to 'src/gallium/state_trackers/egl/gdi') diff --git a/src/gallium/state_trackers/egl/gdi/native_gdi.c b/src/gallium/state_trackers/egl/gdi/native_gdi.c index 56f190de002..ba4ddff2320 100644 --- a/src/gallium/state_trackers/egl/gdi/native_gdi.c +++ b/src/gallium/state_trackers/egl/gdi/native_gdi.c @@ -366,25 +366,7 @@ gdi_create_display(HDC hDC, struct pipe_screen *screen, return &gdpy->base; } -struct native_probe * -native_create_probe(void *dpy) -{ - return NULL; -} - -enum native_probe_result -native_get_probe_result(struct native_probe *nprobe) -{ - return NATIVE_PROBE_UNKNOWN; -} - -const char * -native_get_name(void) -{ - return "GDI"; -} - -struct native_display * +static struct native_display * native_create_display(void *dpy, struct native_event_handler *event_handler) { struct sw_winsys *winsys; @@ -403,3 +385,16 @@ native_create_display(void *dpy, struct native_event_handler *event_handler) return gdi_create_display((HDC) dpy, screen, event_handler); } + +static const struct native_platform gdi_platform = { + "GDI", /* name */ + NULL, /* create_probe */ + NULL, /* get_probe_result */ + native_create_display +}; + +const struct native_platform * +native_get_platform(void) +{ + return &gdi_platform; +} -- cgit v1.2.3