mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
glx: Simplify glXIsDirect
This answer is cached for us at context creation, we never really need to generate protocol here. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>
This commit is contained in:
parent
416e6b174c
commit
8edbe8761f
1 changed files with 2 additions and 17 deletions
|
|
@ -678,28 +678,13 @@ glXCopyContext(Display * dpy, GLXContext source_user,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* \todo
|
||||
* Shouldn't this function \b always return \c False when
|
||||
* \c GLX_DIRECT_RENDERING is not defined? Do we really need to bother with
|
||||
* the GLX protocol here at all?
|
||||
*/
|
||||
_GLX_PUBLIC Bool
|
||||
glXIsDirect(Display * dpy, GLXContext gc_user)
|
||||
{
|
||||
struct glx_context *gc = (struct glx_context *) gc_user;
|
||||
|
||||
if (!gc) {
|
||||
return False;
|
||||
}
|
||||
else if (gc->isDirect) {
|
||||
return True;
|
||||
}
|
||||
#ifdef GLX_USE_APPLEGL /* TODO: indirect on darwin */
|
||||
return False;
|
||||
#else
|
||||
return __glXIsDirect(dpy, gc->xid, NULL);
|
||||
#endif
|
||||
/* This is set for us at context creation */
|
||||
return gc ? gc->isDirect : False;
|
||||
}
|
||||
|
||||
_GLX_PUBLIC GLXPixmap
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue