__glxHashTable *dri2Hash;
- const __DRIextension *loader_extensions[4];
+ const __DRIextension *loader_extensions[5];
};
struct dri2_drawable
return priv->swap_interval;
}
+static void
+driSetBackgroundContext(void *loaderPrivate)
+{
+ struct dri2_context *pcp = (struct dri2_context *) loaderPrivate;
+ __glXSetCurrentContext(&pcp->base);
+}
+
static const __DRIdri2LoaderExtension dri2LoaderExtension = {
.base = { __DRI_DRI2_LOADER, 3 },
.base = { __DRI_USE_INVALIDATE, 1 }
};
+static const __DRIbackgroundCallableExtension driBackgroundCallable = {
+ .base = { __DRI_BACKGROUND_CALLABLE, 1 },
+
+ .setBackgroundContext = driSetBackgroundContext,
+};
+
_X_HIDDEN void
dri2InvalidateBuffers(Display *dpy, XID drawable)
{
pdp->loader_extensions[i++] = &dri2UseInvalidate.base;
+ pdp->loader_extensions[i++] = &driBackgroundCallable.base;
+
pdp->loader_extensions[i++] = NULL;
pdp->dri2Hash = __glxHashCreate();
loader_dri3_wait_gl(draw);
}
+static void
+dri_set_background_context(void *loaderPrivate)
+{
+ struct dri3_context *pcp = (struct dri3_context *)loaderPrivate;
+ __glXSetCurrentContext(&pcp->base);
+}
+
/* The image loader extension record for DRI3
*/
static const __DRIimageLoaderExtension imageLoaderExtension = {
.base = { __DRI_USE_INVALIDATE, 1 }
};
+static const __DRIbackgroundCallableExtension driBackgroundCallable = {
+ .base = { __DRI_BACKGROUND_CALLABLE, 1 },
+
+ .setBackgroundContext = dri_set_background_context,
+};
+
static const __DRIextension *loader_extensions[] = {
&imageLoaderExtension.base,
&dri3UseInvalidate.base,
+ &driBackgroundCallable.base,
NULL
};