summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/common
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-06-17 17:14:03 +0800
committerChia-I Wu <olv@lunarg.com>2010-06-23 15:14:59 +0800
commitf22665df95406567193dee0089f4830664ff4101 (patch)
treeb08d244461f22455b7d2561676eaca105d012776 /src/gallium/state_trackers/egl/common
parent7dc1cf19ace0587254e86bf6544a6659a31f0af8 (diff)
egl: Introduce platform displays internally.
This commit introduces type-safe platform displays internally. A platform display consists of a generic pointer and an enum that specifies the platform. An EGLDisplay is created from a platform display. Native displays become platform displays whose platform is determined by _eglGetNativePlatform(). Platform windows and pixmaps may also be introduced if needed.
Diffstat (limited to 'src/gallium/state_trackers/egl/common')
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.c8
-rw-r--r--src/gallium/state_trackers/egl/common/native.h3
-rw-r--r--src/gallium/state_trackers/egl/common/native_probe.h4
3 files changed, 7 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 361cc7960b..8c7d2cb33e 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -74,10 +74,10 @@ egl_g3d_get_probe(_EGLDriver *drv, _EGLDisplay *dpy)
struct native_probe *nprobe;
nprobe = (struct native_probe *) _eglGetProbeCache(gdrv->probe_key);
- if (!nprobe || nprobe->display != dpy->NativeDisplay) {
+ if (!nprobe || nprobe->display != dpy->PlatformDisplay) {
if (nprobe)
nprobe->destroy(nprobe);
- nprobe = native_create_probe(dpy->NativeDisplay);
+ nprobe = native_create_probe(dpy->PlatformDisplay);
_eglSetProbeCache(gdrv->probe_key, (void *) nprobe);
}
@@ -96,7 +96,7 @@ egl_g3d_destroy_probe(_EGLDriver *drv, _EGLDisplay *dpy)
struct native_probe *nprobe;
nprobe = (struct native_probe *) _eglGetProbeCache(gdrv->probe_key);
- if (nprobe && (!dpy || nprobe->display == dpy->NativeDisplay)) {
+ if (nprobe && (!dpy || nprobe->display == dpy->PlatformDisplay)) {
nprobe->destroy(nprobe);
_eglSetProbeCache(gdrv->probe_key, NULL);
}
@@ -479,7 +479,7 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
}
dpy->DriverData = gdpy;
- gdpy->native = native_create_display(dpy->NativeDisplay,
+ gdpy->native = native_create_display(dpy->PlatformDisplay,
&egl_g3d_native_event_handler);
if (!gdpy->native) {
_eglError(EGL_NOT_INITIALIZED, "eglInitialize(no usable display)");
diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h
index 3f60348c48..494becb61f 100644
--- a/src/gallium/state_trackers/egl/common/native.h
+++ b/src/gallium/state_trackers/egl/common/native.h
@@ -211,7 +211,6 @@ const char *
native_get_name(void);
struct native_display *
-native_create_display(EGLNativeDisplayType dpy,
- struct native_event_handler *handler);
+native_create_display(void *dpy, struct native_event_handler *handler);
#endif /* _NATIVE_H_ */
diff --git a/src/gallium/state_trackers/egl/common/native_probe.h b/src/gallium/state_trackers/egl/common/native_probe.h
index aeed9f85dd..539c4aa70d 100644
--- a/src/gallium/state_trackers/egl/common/native_probe.h
+++ b/src/gallium/state_trackers/egl/common/native_probe.h
@@ -43,7 +43,7 @@ enum native_probe_result {
*/
struct native_probe {
int magic;
- EGLNativeDisplayType display;
+ void *display;
void *data;
void (*destroy)(struct native_probe *nprobe);
@@ -57,7 +57,7 @@ struct native_probe {
* same display.
*/
struct native_probe *
-native_create_probe(EGLNativeDisplayType dpy);
+native_create_probe(void *dpy);
/**
* Probe the probe object.