loader_dri3/glx/egl: Remove the loader_dri3_vtable get_dri_screen callback

It's not very usable since in the rare, but definitely existing case that
we don't have a current context, it will return NULL.

Presumably it will always be safe to use the dri screen the drawable was
created with for operations on that drawable.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
Thomas Hellstrom
2017-08-11 09:57:51 +02:00
parent 934511d1f3
commit 5198e48a0d
4 changed files with 1 additions and 35 deletions

View File

@@ -116,16 +116,6 @@ glx_dri3_get_dri_context(struct loader_dri3_drawable *draw)
return (gc != &dummyContext) ? dri3Ctx->driContext : NULL;
}
static __DRIscreen *
glx_dri3_get_dri_screen(struct loader_dri3_drawable *draw)
{
struct glx_context *gc = __glXGetCurrentContext();
struct dri3_context *pcp = (struct dri3_context *) gc;
struct dri3_screen *psc = (struct dri3_screen *) pcp->base.psc;
return (gc != &dummyContext && psc) ? psc->driScreen : NULL;
}
static void
glx_dri3_flush_drawable(struct loader_dri3_drawable *draw, unsigned flags)
{
@@ -160,7 +150,6 @@ static const struct loader_dri3_vtable glx_dri3_vtable = {
.set_drawable_size = glx_dri3_set_drawable_size,
.in_current_context = glx_dri3_in_current_context,
.get_dri_context = glx_dri3_get_dri_context,
.get_dri_screen = glx_dri3_get_dri_screen,
.flush_drawable = glx_dri3_flush_drawable,
.show_fps = glx_dri3_show_fps,
};