summaryrefslogtreecommitdiffstats
path: root/opengl/libagl
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-04-10 20:34:46 -0700
committerMathias Agopian <mathias@google.com>2009-04-10 20:34:46 -0700
commit8b765b7f5ea7f56963ea0e3141d043d20944dbcc (patch)
tree2e2d2bbce8af56880aa48e1321d60336f12447dd /opengl/libagl
parent2b2fb1a69394edd58666b89597c560442ccc3a90 (diff)
downloadframeworks_native-8b765b7f5ea7f56963ea0e3141d043d20944dbcc.zip
frameworks_native-8b765b7f5ea7f56963ea0e3141d043d20944dbcc.tar.gz
frameworks_native-8b765b7f5ea7f56963ea0e3141d043d20944dbcc.tar.bz2
more debugging tools around BufferMapper
Diffstat (limited to 'opengl/libagl')
-rw-r--r--opengl/libagl/egl.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 5c91c92..9384e18 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -1699,9 +1699,12 @@ EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
reinterpret_cast<gralloc_module_t const*>(pModule);
if (native_buffer->getHandle(native_buffer, &bufferHandle) < 0)
return setError(EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
- if (module->map(module, bufferHandle, &native_buffer->bits) < 0)
+ int err = module->map(module, bufferHandle, &native_buffer->bits);
+ if (err < 0) {
+ LOGW_IF(err, "map(...) failed %d (%s)", err, strerror(-err));
return setError(EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
-
+ }
+
native_buffer->common.incRef(&native_buffer->common);
return (EGLImageKHR)native_buffer;
}
@@ -1725,8 +1728,10 @@ EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR img)
buffer_handle_t bufferHandle;
gralloc_module_t const* module =
reinterpret_cast<gralloc_module_t const*>(pModule);
- if (native_buffer->getHandle(native_buffer, &bufferHandle) == 0) {
- module->unmap(module, bufferHandle);
+ int err = native_buffer->getHandle(native_buffer, &bufferHandle);
+ if (err == 0) {
+ int err = module->unmap(module, bufferHandle);
+ LOGW_IF(err, "unmap(...) failed %d (%s)", err, strerror(-err));
}
}