summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2019-06-07 07:12:42 +0200
committerMathias Fröhlich <[email protected]>2019-06-10 11:06:48 +0200
commita7ecf78b900c28aafdc1cd1e1a4117feb30a66c9 (patch)
treeda269a5af9762133979d43e801823439bfa03c03 /src/egl/drivers/dri2/egl_dri2.c
parent91aa25f4625014ddf194578fc1c1d0a505e5f8db (diff)
egl: Let the caller of dri2_create_drawable decide about loaderPrivate.
In the call arguments to dri2_create_drawable decouple loaderPrivate from dri2_surf. For all callers of dri2_create_drawable the two pointers are the same with the exception of the gbm backed platform. Let the calling code of dri2_create_drawable decide what loaderPrivate shall be. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index cdbc16940b1..ee4faaab34f 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1431,10 +1431,10 @@ dri2_surf_update_fence_fd(_EGLContext *ctx,
EGLBoolean
dri2_create_drawable(struct dri2_egl_display *dri2_dpy,
const __DRIconfig *config,
- struct dri2_egl_surface *dri2_surf)
+ struct dri2_egl_surface *dri2_surf,
+ void *loaderPrivate)
{
__DRIcreateNewDrawableFunc createNewDrawable;
- void *loaderPrivate = dri2_surf;
if (dri2_dpy->image_driver)
createNewDrawable = dri2_dpy->image_driver->createNewDrawable;
@@ -1445,12 +1445,6 @@ dri2_create_drawable(struct dri2_egl_display *dri2_dpy,
else
return _eglError(EGL_BAD_ALLOC, "no createNewDrawable");
- /* As always gbm is a bit special.. */
-#ifdef HAVE_DRM_PLATFORM
- if (dri2_surf->gbm_surf)
- loaderPrivate = dri2_surf->gbm_surf;
-#endif
-
dri2_surf->dri_drawable = (*createNewDrawable)(dri2_dpy->dri_screen,
config, loaderPrivate);
if (dri2_surf->dri_drawable == NULL)