summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl/fbdev
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-06-17 23:21:43 +0800
committerChia-I Wu <[email protected]>2010-06-29 17:16:19 +0800
commitf66a4e20c19d55005854bbee312947ec16e287e3 (patch)
treea8d4450952da24dd3a7f7e14965a28dcea86c677 /src/gallium/state_trackers/egl/fbdev
parentf9574c5f890f3205efa4ab4ff509223e2a7c6b74 (diff)
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.
Diffstat (limited to 'src/gallium/state_trackers/egl/fbdev')
-rw-r--r--src/gallium/state_trackers/egl/fbdev/native_fbdev.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
index 399c1251ef6..ffd32fa46e5 100644
--- a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
+++ b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c
@@ -427,25 +427,7 @@ fbdev_display_create(int fd, struct native_event_handler *event_handler)
return &fbdpy->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 "FBDEV";
-}
-
-struct native_display *
+static struct native_display *
native_create_display(void *dpy, struct native_event_handler *event_handler)
{
struct native_display *ndpy;
@@ -467,3 +449,16 @@ native_create_display(void *dpy, struct native_event_handler *event_handler)
return ndpy;
}
+
+static const struct native_platform fbdev_platform = {
+ "FBDEV", /* name */
+ NULL, /* create_probe */
+ NULL, /* get_probe_result */
+ native_create_display
+};
+
+const struct native_platform *
+native_get_platform(void)
+{
+ return &fbdev_platform;
+}