diff options
author | Mathias Agopian <mathias@google.com> | 2009-04-10 20:34:46 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-04-10 20:34:46 -0700 |
commit | af9a515299b24031c7aa77bf163d0985cc862069 (patch) | |
tree | ce96435679723e8e6592a7283c3841ec8daf5097 /libs/surfaceflinger/BufferAllocator.cpp | |
parent | 7e25da07af7f4f8a876ac97be6e4745877aecb08 (diff) | |
download | frameworks_base-af9a515299b24031c7aa77bf163d0985cc862069.zip frameworks_base-af9a515299b24031c7aa77bf163d0985cc862069.tar.gz frameworks_base-af9a515299b24031c7aa77bf163d0985cc862069.tar.bz2 |
more debugging tools around BufferMapper
Diffstat (limited to 'libs/surfaceflinger/BufferAllocator.cpp')
-rw-r--r-- | libs/surfaceflinger/BufferAllocator.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/surfaceflinger/BufferAllocator.cpp b/libs/surfaceflinger/BufferAllocator.cpp index ac32985..96a2c32 100644 --- a/libs/surfaceflinger/BufferAllocator.cpp +++ b/libs/surfaceflinger/BufferAllocator.cpp @@ -104,11 +104,13 @@ status_t BufferAllocator::free(buffer_handle_t handle) { Mutex::Autolock _l(mLock); -#if ANDROID_GRALLOC_DEBUG - if (handle->data[2]) { - CallStack s; - s.update(); - s.dump(""); +#if ANDROID_GRALLOC_DEBUG + void* base = (void*)(handle->data[2]); + if (base) { + CallStack s; + s.update(); + s.dump(""); + BufferMapper::get().dump(handle); } #endif @@ -143,9 +145,7 @@ status_t BufferAllocator::unmap(buffer_handle_t handle) { Mutex::Autolock _l(mLock); gralloc_module_t* mod = (gralloc_module_t*)mAllocDev->common.module; - status_t err = mod->unmap(mod, handle); - LOGW_IF(err, "unmap(...) failed %d (%s)", err, strerror(-err)); - + status_t err = BufferMapper::get().unmap(handle); if (err == NO_ERROR) { Mutex::Autolock _l(sLock); KeyedVector<buffer_handle_t, alloc_rec_t>& list(sAllocList); |