<div dir="ltr"><div>The idea is to allow the loader to access its own structures. It's sort of like "this" in C++.<br><br></div>Marek<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 31, 2017 at 3:19 PM, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
<br>
Unused and I cannot see any case where we'll need it<br>
<br>
Fixes: 1bf703e4ea5 ("dri_interface,egl,gallium: only expose RGBA visuals<br>
on Android")<br>
Cc: Marek Olšák <<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>><br>
Signed-off-by: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
---<br>
Mostly an RFC, since I don't feel too strongly about it.<br>
<br>
Marek, can you elaborate about the potential usecase?<br>
---<br>
include/GL/internal/dri_<wbr>interface.h | 4 ++--<br>
src/egl/drivers/dri2/platform_<wbr>android.c | 3 +--<br>
src/gallium/state_trackers/<wbr>dri/dri_screen.c | 4 ++--<br>
3 files changed, 5 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/include/GL/internal/dri_<wbr>interface.h b/include/GL/internal/dri_<wbr>interface.h<br>
index c314a43faad..268bb443f9b 100644<br>
--- a/include/GL/internal/dri_<wbr>interface.h<br>
+++ b/include/GL/internal/dri_<wbr>interface.h<br>
@@ -1032,7 +1032,7 @@ struct __DRIdri2LoaderExtensionRec {<br>
*<br>
* \since 4<br>
*/<br>
- unsigned (*getCapability)(void *loaderPrivate, enum dri_loader_cap cap);<br>
+ unsigned (*getCapability)(enum dri_loader_cap cap);<br>
};<br>
<br>
/**<br>
@@ -1770,7 +1770,7 @@ struct __DRIimageLoaderExtensionRec {<br>
*<br>
* \since 2<br>
*/<br>
- unsigned (*getCapability)(void *loaderPrivate, enum dri_loader_cap cap);<br>
+ unsigned (*getCapability)(enum dri_loader_cap cap);<br>
};<br>
<br>
/**<br>
diff --git a/src/egl/drivers/dri2/<wbr>platform_android.c b/src/egl/drivers/dri2/<wbr>platform_android.c<br>
index bae42412b57..189c3c726c7 100644<br>
--- a/src/egl/drivers/dri2/<wbr>platform_android.c<br>
+++ b/src/egl/drivers/dri2/<wbr>platform_android.c<br>
@@ -1014,9 +1014,8 @@ droid_get_buffers_with_format(<wbr>__DRIdrawable * driDrawable,<br>
}<br>
<br>
static unsigned<br>
-droid_get_capability(void *loaderPrivate, enum dri_loader_cap cap)<br>
+droid_get_capability(enum dri_loader_cap cap)<br>
{<br>
- /* Note: loaderPrivate is _EGLDisplay* */<br>
switch (cap) {<br>
case DRI_LOADER_CAP_RGBA_ORDERING:<br>
return 1;<br>
diff --git a/src/gallium/state_trackers/<wbr>dri/dri_screen.c b/src/gallium/state_trackers/<wbr>dri/dri_screen.c<br>
index 890a8bff4c6..0442a2b6667 100644<br>
--- a/src/gallium/state_trackers/<wbr>dri/dri_screen.c<br>
+++ b/src/gallium/state_trackers/<wbr>dri/dri_screen.c<br>
@@ -131,10 +131,10 @@ dri_loader_get_cap(struct dri_screen *screen, enum dri_loader_cap cap)<br>
const __DRIimageLoaderExtension *image_loader = screen->sPriv->image.loader;<br>
<br>
if (dri2_loader && dri2_loader->base.version >= 4)<br>
- return dri2_loader->getCapability(<wbr>screen->sPriv->loaderPrivate, cap);<br>
+ return dri2_loader->getCapability(<wbr>cap);<br>
<br>
if (image_loader && image_loader->base.version >= 2)<br>
- return image_loader->getCapability(<wbr>screen->sPriv->loaderPrivate, cap);<br>
+ return image_loader->getCapability(<wbr>cap);<br>
<br>
return 0;<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.13.3<br>
<br>
</font></span></blockquote></div><br></div>