5 #include <hybris/internal/binding.h>
7 static void * (*_androidCreateDisplaySurface
)();
9 static void *_libui
= NULL
;
11 static void _init_androidui()
13 _libui
= (void *) android_dlopen("/system/lib/libui.so", RTLD_LAZY
);
16 #define UI_DLSYM(fptr, sym) do { if (_libui == NULL) { _init_androidui(); }; if (*(fptr) == NULL) { *(fptr) = (void *) android_dlsym(_libui, sym); } } while (0)
18 static EGLNativeWindowType
android_createDisplaySurface()
20 UI_DLSYM(&_androidCreateDisplaySurface
, "android_createDisplaySurface");
21 return (EGLNativeWindowType
) (*_androidCreateDisplaySurface
)();
26 static int nullws_IsValidDisplay(EGLNativeDisplayType display
)
31 static EGLNativeWindowType
nullws_CreateWindow(EGLNativeWindowType win
, EGLNativeDisplayType display
)
35 return android_createDisplaySurface();
41 static void nullws_DestroyWindow(EGLNativeWindowType win
)
46 static __eglMustCastToProperFunctionPointerType
nullws_eglGetProcAddress(const char *procname
)
51 static void nullws_passthroughImageKHR(EGLContext
*ctx
, EGLenum
*target
, EGLClientBuffer
*buffer
, const EGLint
**attrib_list
)
55 const char *nullws_eglQueryString(EGLDisplay dpy
, EGLint name
, const char *(*real_eglQueryString
)(EGLDisplay dpy
, EGLint name
))
57 return (*real_eglQueryString
)(dpy
, name
);
61 struct ws_module ws_module_info
= {
62 nullws_IsValidDisplay
,
65 nullws_eglGetProcAddress
,
66 nullws_passthroughImageKHR
,