[Mesa-dev] [PATCH v2 2/5] egl: Add EGL_RECORDABLE_ANDROID attribute
Rob Herring
robh at kernel.org
Tue Feb 2 20:23:08 UTC 2016
This is used by Android to select an eglconfig compatible with screen
recording.
Signed-off-by: Rob Herring <robh at kernel.org>
---
v2:
- Also add reporting the extension string
src/egl/main/eglapi.c | 1 +
src/egl/main/eglconfig.c | 3 +++
src/egl/main/eglconfig.h | 2 ++
src/egl/main/egldisplay.h | 1 +
4 files changed, 7 insertions(+)
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 4619855..8eb14e7 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -383,6 +383,7 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
/* Please keep these sorted alphabetically. */
_EGL_CHECK_EXTENSION(ANDROID_framebuffer_target);
_EGL_CHECK_EXTENSION(ANDROID_image_native_buffer);
+ _EGL_CHECK_EXTENSION(ANDROID_recordable);
_EGL_CHECK_EXTENSION(CHROMIUM_sync_control);
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index 0e0058f..8ce4fbe 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -250,6 +250,9 @@ static const struct {
{ EGL_FRAMEBUFFER_TARGET_ANDROID, ATTRIB_TYPE_BOOLEAN,
ATTRIB_CRITERION_EXACT,
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 7bdb090..22da697 100644
--- a/src/egl/main/eglconfig.h
+++ b/src/egl/main/eglconfig.h
@@ -87,6 +87,7 @@ struct _egl_config
/* extensions */
EGLint YInvertedNOK;
EGLint FramebufferTargetAndroid;
+ EGLint RecordableAndroid;
};
@@ -135,6 +136,7 @@ _eglOffsetOfConfig(EGLint attr)
/* extensions */
ATTRIB_MAP(EGL_Y_INVERTED_NOK, YInvertedNOK);
ATTRIB_MAP(EGL_FRAMEBUFFER_TARGET_ANDROID, FramebufferTargetAndroid);
+ ATTRIB_MAP(EGL_RECORDABLE_ANDROID, RecordableAndroid);
#undef ATTRIB_MAP
default:
return -1;
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index e156c79..008c467 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -92,6 +92,7 @@ struct _egl_extensions
/* Please keep these sorted alphabetically. */
EGLBoolean ANDROID_framebuffer_target;
EGLBoolean ANDROID_image_native_buffer;
+ EGLBoolean ANDROID_recordable;
EGLBoolean CHROMIUM_sync_control;
--
2.5.0
More information about the mesa-dev
mailing list