Merge "Minor changes needed to support EXT_protected_content." into nyc-dev
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#define EGL_QCOM_PROTECTED_CONTENT 0x32E0
|
#define EGL_PROTECTED_CONTENT_EXT 0x32C0
|
||||||
|
|
||||||
namespace android {
|
namespace android {
|
||||||
|
|
||||||
@@ -64,19 +64,12 @@ static bool isProtectedContext() {
|
|||||||
EGLDisplay dpy = eglGetCurrentDisplay();
|
EGLDisplay dpy = eglGetCurrentDisplay();
|
||||||
EGLContext ctx = eglGetCurrentContext();
|
EGLContext ctx = eglGetCurrentContext();
|
||||||
|
|
||||||
if (dpy == EGL_NO_DISPLAY) {
|
if (dpy == EGL_NO_DISPLAY || ctx == EGL_NO_CONTEXT) {
|
||||||
ALOGI("isProtectedSurface: invalid current EGLDisplay");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ctx == EGL_NO_CONTEXT) {
|
|
||||||
ALOGI("isProtectedSurface: invalid current EGLContext");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
EGLint isProtected = EGL_FALSE;
|
EGLint isProtected = EGL_FALSE;
|
||||||
// TODO: Change the enum value below when an extension is ratified.
|
eglQueryContext(dpy, ctx, EGL_PROTECTED_CONTENT_EXT, &isProtected);
|
||||||
eglQueryContext(dpy, ctx, EGL_QCOM_PROTECTED_CONTENT, &isProtected);
|
|
||||||
|
|
||||||
return isProtected;
|
return isProtected;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user