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 | 8b765b7f5ea7f56963ea0e3141d043d20944dbcc (patch) | |
tree | 2e2d2bbce8af56880aa48e1321d60336f12447dd /include/ui/BufferMapper.h | |
parent | 2b2fb1a69394edd58666b89597c560442ccc3a90 (diff) | |
download | frameworks_native-8b765b7f5ea7f56963ea0e3141d043d20944dbcc.zip frameworks_native-8b765b7f5ea7f56963ea0e3141d043d20944dbcc.tar.gz frameworks_native-8b765b7f5ea7f56963ea0e3141d043d20944dbcc.tar.bz2 |
more debugging tools around BufferMapper
Diffstat (limited to 'include/ui/BufferMapper.h')
-rw-r--r-- | include/ui/BufferMapper.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/ui/BufferMapper.h b/include/ui/BufferMapper.h index 8a33b2e..9e5c5d7 100644 --- a/include/ui/BufferMapper.h +++ b/include/ui/BufferMapper.h @@ -19,8 +19,11 @@ #include <stdint.h> #include <sys/types.h> + +#include <utils/CallStack.h> #include <utils/threads.h> #include <utils/Singleton.h> +#include <utils/KeyedVector.h> #include <hardware/gralloc.h> @@ -42,11 +45,22 @@ public: status_t lock(buffer_handle_t handle, int usage, const Rect& bounds); status_t unlock(buffer_handle_t handle); + // dumps information about the mapping of this handle + void dump(buffer_handle_t handle); + private: friend class Singleton<BufferMapper>; BufferMapper(); mutable Mutex mLock; gralloc_module_t const *mAllocMod; + + struct map_info_t { + int count; + KeyedVector<CallStack, int> callstacks; + }; + KeyedVector<buffer_handle_t, map_info_t> mMapInfo; + void logMapLocked(buffer_handle_t handle); + void logUnmapLocked(buffer_handle_t handle); }; // --------------------------------------------------------------------------- |