[Mesa-dev] [PATCH 5/6] egl: directfb: instantiate a new native DirectFB platform

Ilyes Gouta ilyes.gouta at gmail.com
Sun Apr 14 10:50:48 PDT 2013


Signed-off-by: Ilyes Gouta <ilyes.gouta at gmail.com>
---
 src/egl/main/egldisplay.c                       | 7 ++++++-
 src/egl/main/egldisplay.h                       | 1 +
 src/gallium/state_trackers/egl/common/egl_g3d.c | 6 ++++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 985e781..6231d85 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -74,7 +74,8 @@ static const struct {
    { _EGL_PLATFORM_DRM, "drm" },
    { _EGL_PLATFORM_FBDEV, "fbdev" },
    { _EGL_PLATFORM_NULL, "null" },
-   { _EGL_PLATFORM_ANDROID, "android" }
+   { _EGL_PLATFORM_ANDROID, "android" },
+   { _EGL_PLATFORM_DIRECTFB, "directfb" }
 };
 
 
@@ -154,6 +155,10 @@ _eglNativePlatformDetectNativeDisplay(EGLNativeDisplayType nativeDisplay)
       return _EGL_PLATFORM_FBDEV;
 #endif
 
+#ifdef HAVE_DIRECTFB_PLATFORM
+   return _EGL_PLATFORM_DIRECTFB;
+#endif
+
    if (_eglPointerIsDereferencable(nativeDisplay)) {
       void *first_pointer = *(void **) nativeDisplay;
 
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 4b33470..8efb3a1 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -46,6 +46,7 @@ enum _egl_platform_type {
    _EGL_PLATFORM_FBDEV,
    _EGL_PLATFORM_NULL,
    _EGL_PLATFORM_ANDROID,
+   _EGL_PLATFORM_DIRECTFB,
 
    _EGL_NUM_PLATFORMS,
    _EGL_INVALID_PLATFORM = -1
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 86abaeb..cb1a670 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -132,6 +132,12 @@ egl_g3d_get_platform(_EGLDriver *drv, _EGLPlatformType plat)
          nplat = native_get_fbdev_platform(&egl_g3d_native_event_handler);
 #endif
          break;
+      case _EGL_PLATFORM_DIRECTFB:
+         plat_name = "directfb";
+#ifdef HAVE_DIRECTFB_BACKEND
+         nplat = native_get_directfb_platform(&egl_g3d_native_event_handler);
+#endif
+         break;
       case _EGL_PLATFORM_NULL:
          plat_name = "NULL";
 #ifdef HAVE_NULL_BACKEND
-- 
1.8.1.4



More information about the mesa-dev mailing list