Merge "assert -eng builds when calling a GL function without a context" into jb-mr1-dev

This commit is contained in:
Mathias Agopian 2012-09-26 18:48:54 -07:00 committed by Android (Google) Code Review
commit 1e83690c60

View File

@ -166,8 +166,13 @@ void setGLHooksThreadSpecific(gl_hooks_t const *value) {
static int gl_no_context() { static int gl_no_context() {
if (egl_tls_t::logNoContextCall()) { if (egl_tls_t::logNoContextCall()) {
ALOGE("call to OpenGL ES API with no current context " char const* const error = "call to OpenGL ES API with "
"(logged once per thread)"); "no current context (logged once per thread)";
if (LOG_NDEBUG) {
ALOGE(error);
} else {
LOG_ALWAYS_FATAL(error);
}
char value[PROPERTY_VALUE_MAX]; char value[PROPERTY_VALUE_MAX];
property_get("debug.egl.callstack", value, "0"); property_get("debug.egl.callstack", value, "0");
if (atoi(value)) { if (atoi(value)) {