Merge "OMX AAC: define DRC effect type param & xHE object" into pi-dev
diff --git a/libs/gui/BufferItemConsumer.cpp b/libs/gui/BufferItemConsumer.cpp
index 34e6d80..89bc0c4 100644
--- a/libs/gui/BufferItemConsumer.cpp
+++ b/libs/gui/BufferItemConsumer.cpp
@@ -92,10 +92,13 @@
Mutex::Autolock _l(mMutex);
err = addReleaseFenceLocked(item.mSlot, item.mGraphicBuffer, releaseFence);
+ if (err != OK) {
+ BI_LOGE("Failed to addReleaseFenceLocked");
+ }
err = releaseBufferLocked(item.mSlot, item.mGraphicBuffer, EGL_NO_DISPLAY,
EGL_NO_SYNC_KHR);
- if (err != OK) {
+ if (err != OK && err != IGraphicBufferConsumer::STALE_BUFFER_SLOT) {
BI_LOGE("Failed to release buffer: %s (%d)",
strerror(-err), err);
}
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index b022a20..3615577 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -1733,13 +1733,31 @@
ContextRef _c(dp.get(), ctx);
egl_context_t * const c = _c.get();
+ // Temporary hack: eglImageCreateKHR should accept EGL_GL_COLORSPACE_LINEAR_KHR,
+ // EGL_GL_COLORSPACE_SRGB_KHR and EGL_GL_COLORSPACE_DEFAULT_EXT if
+ // EGL_EXT_image_gl_colorspace is supported, but some drivers don't like
+ // the DEFAULT value and generate an error.
+ std::vector<EGLint> strippedAttribList;
+ for (const EGLint *attr = attrib_list; attr && attr[0] != EGL_NONE; attr += 2) {
+ if (attr[0] == EGL_GL_COLORSPACE_KHR &&
+ dp->haveExtension("EGL_EXT_image_gl_colorspace")) {
+ if (attr[1] != EGL_GL_COLORSPACE_LINEAR_KHR &&
+ attr[1] != EGL_GL_COLORSPACE_SRGB_KHR) {
+ continue;
+ }
+ }
+ strippedAttribList.push_back(attr[0]);
+ strippedAttribList.push_back(attr[1]);
+ }
+ strippedAttribList.push_back(EGL_NONE);
+
EGLImageKHR result = EGL_NO_IMAGE_KHR;
egl_connection_t* const cnx = &gEGLImpl;
if (cnx->dso && cnx->egl.eglCreateImageKHR) {
result = cnx->egl.eglCreateImageKHR(
dp->disp.dpy,
c ? c->context : EGL_NO_CONTEXT,
- target, buffer, attrib_list);
+ target, buffer, strippedAttribList.data());
}
return result;
}