diff options
author | Mathias Agopian <mathias@google.com> | 2009-04-15 18:34:24 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-04-15 18:34:24 -0700 |
commit | 4243e666213029a293935987c979831093fb0779 (patch) | |
tree | 1df34a10a3f35e592a5437b521c75aa272fe03ed /include/ui/BufferMapper.h | |
parent | 4cf74ac30a468bf33c2ec21a715f4bbfde7509d5 (diff) | |
download | frameworks_native-4243e666213029a293935987c979831093fb0779.zip frameworks_native-4243e666213029a293935987c979831093fb0779.tar.gz frameworks_native-4243e666213029a293935987c979831093fb0779.tar.bz2 |
fix a rookie mistake causing Singleton<> to be a "multiton". Also improve the BufferMapper's debugging, but turn it off.
Squashed commit of the following:
commit 04e9cae7f806bd65f2cfe35c011b47a36773bbe5
Author: Mathias Agopian <mathias@google.com>
Date: Wed Apr 15 18:30:30 2009 -0700
fix and improve BufferMapper's tracking of mapped buffers.
commit 1a8deaed15811092b2349cc3c40cafb5f722046c
Author: Mathias Agopian <mathias@google.com>
Date: Wed Apr 15 00:52:02 2009 -0700
fix some bugs with the Singleton<> class. untested.
commit ed01cc06ad70cf640ce1258f01189cb1a96fd3a8
Author: Mathias Agopian <mathias@google.com>
Date: Tue Apr 14 19:29:25 2009 -0700
some work to debug the Singleton<> template.
Diffstat (limited to 'include/ui/BufferMapper.h')
-rw-r--r-- | include/ui/BufferMapper.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/ui/BufferMapper.h b/include/ui/BufferMapper.h index 9e5c5d7..ff90033 100644 --- a/include/ui/BufferMapper.h +++ b/include/ui/BufferMapper.h @@ -40,8 +40,8 @@ class BufferMapper : public Singleton<BufferMapper> { public: static inline BufferMapper& get() { return getInstance(); } - status_t map(buffer_handle_t handle, void** addr); - status_t unmap(buffer_handle_t handle); + status_t map(buffer_handle_t handle, void** addr, const void* id); + status_t unmap(buffer_handle_t handle, const void* id); status_t lock(buffer_handle_t handle, int usage, const Rect& bounds); status_t unlock(buffer_handle_t handle); @@ -54,13 +54,13 @@ private: mutable Mutex mLock; gralloc_module_t const *mAllocMod; + void logMapLocked(buffer_handle_t handle, const void* id); + void logUnmapLocked(buffer_handle_t handle, const void* id); struct map_info_t { - int count; - KeyedVector<CallStack, int> callstacks; + const void* id; + CallStack stack; }; - KeyedVector<buffer_handle_t, map_info_t> mMapInfo; - void logMapLocked(buffer_handle_t handle); - void logUnmapLocked(buffer_handle_t handle); + KeyedVector<buffer_handle_t, Vector<map_info_t> > mMapInfo; }; // --------------------------------------------------------------------------- |