diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-06-17 23:21:43 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-06-29 17:16:19 +0800 |
commit | f66a4e20c19d55005854bbee312947ec16e287e3 (patch) | |
tree | a8d4450952da24dd3a7f7e14965a28dcea86c677 /src/gallium/state_trackers/egl/common/native.h | |
parent | f9574c5f890f3205efa4ab4ff509223e2a7c6b74 (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/common/native.h')
-rw-r--r-- | src/gallium/state_trackers/egl/common/native.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h index 494becb61f..941adfc03f 100644 --- a/src/gallium/state_trackers/egl/common/native.h +++ b/src/gallium/state_trackers/egl/common/native.h @@ -207,10 +207,28 @@ native_attachment_mask_test(uint mask, enum native_attachment att) return !!(mask & (1 << att)); } -const char * -native_get_name(void); +struct native_platform { + const char *name; -struct native_display * -native_create_display(void *dpy, struct native_event_handler *handler); + /** + * Return a probe object for the given display. + * + * Note that the returned object may be cached and used by different native + * display modules. It allows fast probing when multiple modules probe the + * same display. + */ + struct native_probe *(*create_probe)(void *dpy); + + /** + * Probe the probe object. + */ + enum native_probe_result (*get_probe_result)(struct native_probe *nprobe); + + struct native_display *(*create_display)(void *dpy, + struct native_event_handler *handler); +}; + +const struct native_platform * +native_get_platform(void); #endif /* _NATIVE_H_ */ |