[Mesa-dev] [PATCH 3/3] egl/main: expose the EGL_RECORDABLE_ANDROID extension
Eric Anholt
eric at anholt.net
Fri Jun 19 13:02:23 PDT 2015
Chih-Wei Huang <cwhuang at android-x86.org> writes:
The commit message needs some explanation: Why are we doing this? What
does EGL_ANDROID_recordable get us, if we don't have any configs
exposing it? What tests do we have for it?
> Signed-off-by: Chih-Wei Huang <cwhuang at linux.org.tw>
> ---
> src/egl/main/eglconfig.c | 5 ++++-
> src/egl/main/eglconfig.h | 2 ++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
> index cf65c69..d9971ed 100644
> --- a/src/egl/main/eglconfig.c
> +++ b/src/egl/main/eglconfig.c
> @@ -245,7 +245,10 @@ static const struct {
> /* extensions */
> { EGL_Y_INVERTED_NOK, ATTRIB_TYPE_BOOLEAN,
> ATTRIB_CRITERION_EXACT,
> - EGL_DONT_CARE }
> + EGL_DONT_CARE },
> + { EGL_RECORDABLE_ANDROID, ATTRIB_TYPE_BOOLEAN,
> + ATTRIB_CRITERION_EXACT,
> + EGL_DONT_CARE },
> };
>
>
> diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h
> index 84cb227..7121b3d 100644
> --- a/src/egl/main/eglconfig.h
> +++ b/src/egl/main/eglconfig.h
> @@ -86,6 +86,7 @@ struct _egl_config
>
> /* extensions */
> EGLint YInvertedNOK;
> + EGLint RecordableAndroid;
> };
>
>
> @@ -133,6 +134,7 @@ _eglOffsetOfConfig(EGLint attr)
> ATTRIB_MAP(EGL_CONFORMANT, Conformant);
> /* extensions */
> ATTRIB_MAP(EGL_Y_INVERTED_NOK, YInvertedNOK);
> + ATTRIB_MAP(EGL_RECORDABLE_ANDROID, RecordableAndroid);
> #undef ATTRIB_MAP
> default:
> return -1;
You're not exposing the extension in _eglCreateExtensionsString(), and
nobody should use (or be able to use) the extension without that.
It also looks like you're missing the bits _eglIsConfigAttribValid()
code to see if the extension is exposed before supporting the new enum.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150619/47fb08f0/attachment.sig>
More information about the mesa-dev
mailing list