MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / eglGetPlatformDisplay

Function eglGetPlatformDisplay

server/faker-egl.cpp:883–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

881
882
883EGLDisplay eglGetPlatformDisplay(EGLenum platform, void *native_display,
884 const EGLAttrib *attrib_list)
885{
886 faker::EGLXDisplay *eglxdpy = NULL;
887 EGLDisplay display = EGL_NO_DISPLAY;
888 int screen = -1;
889
890 TRY();
891
892 if(platform != EGL_PLATFORM_X11_EXT
893 || (native_display != EGL_DEFAULT_DISPLAY
894 && faker::isDisplayExcluded((Display *)native_display)))
895 return _eglGetPlatformDisplay(platform, native_display, attrib_list);
896
897 DISABLE_FAKER();
898
899 /////////////////////////////////////////////////////////////////////////////
900 OPENTRACE(eglGetPlatformDisplay); PRARGX(platform); PRARGD(native_display);
901 PRARGALEGL(attrib_list); STARTTRACE();
902 /////////////////////////////////////////////////////////////////////////////
903
904 if(attrib_list)
905 {
906 for(int i = 0; i < MAX_ATTRIBS && attrib_list[i] != EGL_NONE; i += 2)
907 {
908 if(attrib_list[i] == EGL_PLATFORM_X11_SCREEN_EXT)
909 screen = attrib_list[i + 1];
910 }
911 }
912
913 CREATE_DISPLAY()
914
915 done:
916 /////////////////////////////////////////////////////////////////////////////
917 STOPTRACE(); PRARGX(display); CLOSETRACE();
918 /////////////////////////////////////////////////////////////////////////////
919
920 CATCH();
921 ENABLE_FAKER();
922 return (EGLDisplay)display;
923}
924
925EGLDisplay eglGetPlatformDisplayEXT(EGLenum platform, void *native_display,
926 const EGLint *attrib_list)

Callers 4

readbackTestFunction · 0.85
extensionQueryTestFunction · 0.85
eglGetPlatformDisplayEXTFunction · 0.85
mainFunction · 0.85

Calls 1

isDisplayExcludedFunction · 0.85

Tested by

no test coverage detected