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

Function XCloseDisplay

server/faker-x11.cpp:36–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34// corresponding VirtualWin instances are shut down.
35
36int XCloseDisplay(Display *dpy)
37{
38 // MainWin calls various X11 functions from the destructor of one of its
39 // shared libraries, which is executed after the VirtualGL Faker has shut
40 // down, so we cannot access fconfig or vglout or winh without causing
41 // deadlocks or other issues. At this point, all we can safely do is hand
42 // off to libX11.
43 if(faker::deadYet || faker::getFakerLevel() > 0)
44 return _XCloseDisplay(dpy);
45
46 int retval = 0;
47 TRY();
48
49 /////////////////////////////////////////////////////////////////////////////
50 OPENTRACE(XCloseDisplay); PRARGD(dpy); STARTTRACE();
51 /////////////////////////////////////////////////////////////////////////////
52
53 DISABLE_FAKER();
54
55 #ifdef FAKEXCB
56 if(fconfig.fakeXCB)
57 {
58 CHECKSYM_NONFATAL(XGetXCBConnection)
59 if(!__XGetXCBConnection)
60 {
61 if(fconfig.verbose)
62 vglout.print("[VGL] Disabling XCB interposer\n");
63 fconfig.fakeXCB = 0;
64 }
65 else
66 {
67 xcb_connection_t *conn = _XGetXCBConnection(dpy);
68 XCBCONNHASH.remove(conn);
69 }
70 }
71 #endif
72
73 WINHASH.remove(dpy);
74 retval = _XCloseDisplay(dpy);
75
76 /////////////////////////////////////////////////////////////////////////////
77 STOPTRACE(); CLOSETRACE();
78 /////////////////////////////////////////////////////////////////////////////
79
80 CATCH();
81 ENABLE_FAKER();
82 return retval;
83}
84
85
86// We have to override this function in order to handle GLX pixmap rendering

Callers 15

startFunction · 0.85
initMethod · 0.85
~GLFrameMethod · 0.85
testFunction · 0.85
readbackTestFunction · 0.85
readbackTestMSFunction · 0.85
flushTestFunction · 0.85
visTestFunction · 0.85
multiThreadTestFunction · 0.85
offScreenTestFunction · 0.85
contextMismatchTestFunction · 0.85
copyContextTestFunction · 0.85

Calls 2

printMethod · 0.45
removeMethod · 0.45

Tested by 3

testFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68