Drop createDrawable and destroyDrawable fron DRIinterfaceMethods.
All the DRI driver did was call the createDrawable callback immediately
upon entry to DRIscreen::createNewDrawable to get the drm_drawable_t.
We can just call that before calling into the DRI driver and pass the
returned drm_drawable_t as an argument to the DRI entry point.
Likewise for destroyDrawable.
Also, DRIdrawablePrivate::draw isn't used anywhere, and since the
driver no longer needs the XID of the drawable we can now drop that.
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 45ee93c..229da5a 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -85,7 +85,7 @@
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
__GLXscreenConfigs *sc;
__DRIid draw;
- __DRIdrawable *pdraw;
+ __GLXdrawable *pdraw;
XWindowAttributes xwa;
int (*oldXErrorHandler)(Display *, XErrorEvent *);
@@ -105,7 +105,8 @@
if (!windowExistsFlag) {
/* Destroy the local drawable data, if the drawable no
longer exists in the Xserver */
- (*pdraw->destroyDrawable)(pdraw->private);
+ (*pdraw->driDrawable.destroyDrawable)(pdraw->driDrawable.private);
+ XF86DRIDestroyDrawable(dpy, sc->scr, draw);
Xfree(pdraw);
}
} while (__glxHashNext(sc->drawHash, &draw, (void *)&pdraw) == 1);