summaryrefslogtreecommitdiff
path: root/gralloc4/src/hidl_common/RegisteredHandlePool.h
diff options
context:
space:
mode:
Diffstat (limited to 'gralloc4/src/hidl_common/RegisteredHandlePool.h')
-rw-r--r--gralloc4/src/hidl_common/RegisteredHandlePool.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gralloc4/src/hidl_common/RegisteredHandlePool.h b/gralloc4/src/hidl_common/RegisteredHandlePool.h
index d3fb9b0..b318e54 100644
--- a/gralloc4/src/hidl_common/RegisteredHandlePool.h
+++ b/gralloc4/src/hidl_common/RegisteredHandlePool.h
@@ -33,7 +33,7 @@ public:
bool add(buffer_handle_t bufferHandle);
/* Retrieves and removes the buffer handle from internal list */
- native_handle_t* remove(void* buffer);
+ native_handle_t* remove(buffer_handle_t buffer);
/* Retrieves the buffer handle from internal list */
buffer_handle_t get(const void* buffer);
@@ -41,6 +41,8 @@ public:
/* Applies a function to each buffer handle */
void for_each(std::function<void(const buffer_handle_t &)> fn);
+ bool isRegistered(buffer_handle_t handle);
+
private:
std::mutex mutex;
std::unordered_set<buffer_handle_t> bufPool;