glx: Stash a copy of the XExtCodes in the glx_display

Instead of a pointer into xlib's state for it. Mostly because it lets us
remove our copy of majorOpcode from the display without taking another
pointer indirection.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>
This commit is contained in:
Adam Jackson
2021-04-23 00:42:35 -04:00
committed by Marge Bot
parent 1f096b51c6
commit 2c8a85b712
5 changed files with 17 additions and 28 deletions

View File

@@ -716,7 +716,7 @@ unsigned dri2GetSwapEventType(Display* dpy, XID drawable)
pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, drawable);
if (!pdraw || !(pdraw->eventMask & GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK))
return 0;
return glx_dpy->codes->first_event + GLX_BufferSwapComplete;
return glx_dpy->codes.first_event + GLX_BufferSwapComplete;
}
static void show_fps(struct dri2_drawable *draw)