summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorMauro Rossi <issor.oruam@gmail.com>2016-10-16 13:41:24 +0200
committerMauro Rossi <issor.oruam@gmail.com>2016-11-01 20:42:00 +0100
commitaf372b746d17afb50c173691c5ab3774375fadc9 (patch)
tree77bcddefefd60685eeb6e586be7a512d821b0d5d /src/egl
parentfc2913995ad0086eb000f7194d2a079be238cd65 (diff)
downloadexternal_mesa3d-af372b746d17afb50c173691c5ab3774375fadc9.zip
external_mesa3d-af372b746d17afb50c173691c5ab3774375fadc9.tar.gz
external_mesa3d-af372b746d17afb50c173691c5ab3774375fadc9.tar.bz2
egl/android: update swrast loader and extensions storage
Changes are applied to swrast loader and extensions storage in the same way as per commit 6a8fe32 "egl/android: don't populate dri2_dpy->dri2_loader_extension" and commit f871946 "egl/dri2: rework dri2_egl_display::extensions storage" For simplification, primitives in droid_swrast_loader_extensions are listed in the same order as per commit 2dbe14a "egl/wayland: don't populate dri2_dpy->swrast_loader_extension"
Diffstat (limited to 'src/egl')
-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";