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/egl/main/egldisplay.h | |
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/egl/main/egldisplay.h')
-rw-r--r-- | src/egl/main/egldisplay.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index 42e305f91ac..65dfdc33410 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -7,6 +7,18 @@ #include "eglmutex.h" +enum _egl_platform_type { + _EGL_PLATFORM_WINDOWS, + _EGL_PLATFORM_X11, + _EGL_PLATFORM_DRM, + _EGL_PLATFORM_FBDEV, + + _EGL_NUM_PLATFORMS, + _EGL_INVALID_PLATFORM = -1 +}; +typedef enum _egl_platform_type _EGLPlatformType; + + enum _egl_resource_type { _EGL_RESOURCE_CONTEXT, _EGL_RESOURCE_SURFACE, @@ -53,14 +65,15 @@ struct _egl_extensions }; -struct _egl_display +struct _egl_display { /* used to link displays */ _EGLDisplay *Next; _EGLMutex Mutex; - EGLNativeDisplayType NativeDisplay; + _EGLPlatformType Platform; + void *PlatformDisplay; EGLBoolean Initialized; /**< True if the display is initialized */ _EGLDriver *Driver; @@ -92,7 +105,7 @@ _eglFiniDisplay(void); extern _EGLDisplay * -_eglFindDisplay(EGLNativeDisplayType displayName); +_eglFindDisplay(_EGLPlatformType plat, void *plat_dpy); PUBLIC void |