summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/platform_android.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index d51dccb..67f799c 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -1154,6 +1154,15 @@ static const __DRIimageLoaderExtension droid_image_loader_extension = {
.flushFrontBuffer = droid_flush_front_buffer,
};
+static const __DRIswrastLoaderExtension droid_swrast_loader_extension = {
+ .base = { __DRI_SWRAST_LOADER, 2 },
+
+ .getDrawableInfo = swrastGetDrawableInfo,
+ .putImage = swrastPutImage,
+ .getImage = swrastGetImage,
+ .putImage2 = swrastPutImage2,
+};
+
static const __DRIextension *droid_dri2_loader_extensions[] = {
&droid_dri2_loader_extension.base,
&image_lookup_extension.base,
@@ -1168,6 +1177,12 @@ static const __DRIextension *droid_image_loader_extensions[] = {
NULL,
};
+static const __DRIextension *droid_swrast_loader_extensions[] = {
+ &droid_swrast_loader_extension.base,
+ &image_lookup_extension.base,
+ NULL,
+};
+
static EGLBoolean
dri2_initialize_android_drm(_EGLDriver *drv, _EGLDisplay *dpy)
{
@@ -1289,16 +1304,7 @@ dri2_initialize_android_swrast(_EGLDriver *drv, _EGLDisplay *dpy)
goto cleanup_driver_name;
}
- dri2_dpy->swrast_loader_extension.base.name = __DRI_SWRAST_LOADER;
- dri2_dpy->swrast_loader_extension.base.version = 2;
- dri2_dpy->swrast_loader_extension.getDrawableInfo = swrastGetDrawableInfo;
- dri2_dpy->swrast_loader_extension.putImage = swrastPutImage;
- dri2_dpy->swrast_loader_extension.putImage2 = swrastPutImage2;
- dri2_dpy->swrast_loader_extension.getImage = swrastGetImage;
-
- dri2_dpy->extensions[0] = &dri2_dpy->swrast_loader_extension.base;
- dri2_dpy->extensions[1] = &image_lookup_extension.base;
- dri2_dpy->extensions[2] = NULL;
+ dri2_dpy->loader_extensions = droid_swrast_loader_extensions;
if (!dri2_create_screen(dpy)) {
err = "DRISW: failed to create screen";