summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorRob Herring <[email protected]>2016-02-02 14:23:08 -0600
committerEmil Velikov <[email protected]>2016-04-01 13:45:08 +0100
commite21e81aa1885287e438970429d44abb8b3dabb96 (patch)
tree785b1ee7d63a251c04a6eae6947fa8b058b2b858 /src/egl/main
parent8975527f58afd4af77966c6e46b485fc04008779 (diff)
egl: Add EGL_RECORDABLE_ANDROID attribute
This is used by Android to select an eglconfig compatible with screen recording. Cc: [email protected] Signed-off-by: Rob Herring <[email protected]> [Emil Velikov: add the _eglIsConfigAttribValid check] Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglapi.c1
-rw-r--r--src/egl/main/eglconfig.c5
-rw-r--r--src/egl/main/eglconfig.h2
-rw-r--r--src/egl/main/egldisplay.h1
4 files changed, 9 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 6c395bdf311..8886759011a 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 7d2791ca340..435d9245384 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -249,6 +249,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 },
};
@@ -493,6 +496,8 @@ _eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr)
return conf->Display->Extensions.NOK_texture_from_pixmap;
case EGL_FRAMEBUFFER_TARGET_ANDROID:
return conf->Display->Extensions.ANDROID_framebuffer_target;
+ case EGL_RECORDABLE_ANDROID:
+ return conf->Display->Extensions.ANDROID_recordable;
default:
break;
}
diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h
index 7bdb090c46c..22da697e83c 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 a468a312784..6bfc8589a42 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;