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

Function eglGetCurrentSurface

server/faker-egl.cpp:784–813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

782
783
784EGLSurface eglGetCurrentSurface(EGLint readdraw)
785{
786 EGLSurface surface = 0, actualSurface = 0;
787
788 TRY();
789
790 if(faker::getEGLExcludeCurrent() || !faker::getEGLXContextCurrent())
791 return _eglGetCurrentSurface(readdraw);
792
793 DISABLE_FAKER();
794
795 /////////////////////////////////////////////////////////////////////////////
796 OPENTRACE(eglGetCurrentSurface); PRARGX(readdraw); STARTTRACE();
797 /////////////////////////////////////////////////////////////////////////////
798
799 actualSurface = surface = _eglGetCurrentSurface(readdraw);
800 faker::EGLXVirtualWin *eglxvw =
801 EGLXWINHASH.findInternal(faker::getCurrentEGLXDisplay(), actualSurface);
802 if(eglxvw) surface = eglxvw->getDummySurface();
803
804 /////////////////////////////////////////////////////////////////////////////
805 STOPTRACE(); PRARGX(surface);
806 if(surface != actualSurface) PRARGX(actualSurface);
807 CLOSETRACE();
808 /////////////////////////////////////////////////////////////////////////////
809
810 CATCH();
811 ENABLE_FAKER();
812 return surface;
813}
814
815
816#define CREATE_DISPLAY() \

Callers 2

checkCurrentFunction · 0.85
checkReadbackStateFunction · 0.85

Calls 2

findInternalMethod · 0.80
getDummySurfaceMethod · 0.80

Tested by

no test coverage detected