mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
GLX: Add a function to change a clients vendor list.
Add a new function, GlxServerExports::setClientScreenVendor, which will change the vendor that handles GLX requests for a screen, but only for requests from a specific client. v2: Increment the GLXVND minor version number. v3: Note the GLXVND version requirement for setClientScreenVendor. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
committed by
Aaron Plattner
parent
8b67ec7cc6
commit
56c0a71fdd
@@ -189,6 +189,27 @@ Bool GlxSetScreenVendor(ScreenPtr screen, GlxServerVendor *vendor)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Bool GlxSetClientScreenVendor(ClientPtr client, ScreenPtr screen, GlxServerVendor *vendor)
|
||||
{
|
||||
GlxClientPriv *cl;
|
||||
|
||||
if (screen == NULL || screen->isGPU) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cl = GlxGetClientData(client);
|
||||
if (cl == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (vendor != NULL) {
|
||||
cl->vendors[screen->myNum] = vendor;
|
||||
} else {
|
||||
cl->vendors[screen->myNum] = GlxGetVendorForScreen(NULL, screen);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GlxServerVendor *GlxGetVendorForScreen(ClientPtr client, ScreenPtr screen)
|
||||
{
|
||||
// Note that the client won't be sending GPU screen numbers, so we don't
|
||||
|
||||
Reference in New Issue
Block a user