diff options
author | Chia-I Wu <[email protected]> | 2010-06-17 17:14:03 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-06-23 15:14:59 +0800 |
commit | f22665df95406567193dee0089f4830664ff4101 (patch) | |
tree | b08d244461f22455b7d2561676eaca105d012776 /src/gallium/state_trackers/egl/fbdev | |
parent | 7dc1cf19ace0587254e86bf6544a6659a31f0af8 (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/fbdev')
-rw-r--r-- | src/gallium/state_trackers/egl/fbdev/native_fbdev.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c index d70b7c6eb96..399c1251ef6 100644 --- a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c +++ b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c @@ -428,7 +428,7 @@ fbdev_display_create(int fd, struct native_event_handler *event_handler) } struct native_probe * -native_create_probe(EGLNativeDisplayType dpy) +native_create_probe(void *dpy) { return NULL; } @@ -446,18 +446,17 @@ native_get_name(void) } struct native_display * -native_create_display(EGLNativeDisplayType dpy, - struct native_event_handler *event_handler) +native_create_display(void *dpy, struct native_event_handler *event_handler) { struct native_display *ndpy; int fd; /* well, this makes fd 0 being ignored */ - if (dpy == EGL_DEFAULT_DISPLAY) { + if (!dpy) { fd = open("/dev/fb0", O_RDWR); } else { - fd = dup((int) pointer_to_intptr((void *) dpy)); + fd = dup((int) pointer_to_intptr(dpy)); } if (fd < 0) return NULL; |