summaryrefslogtreecommitdiff
path: root/gralloc4/src/hidl_common/RegisteredHandlePool.h
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2024-01-17 22:14:14 -0800
committerXin Li <delphij@google.com>2024-01-17 22:14:14 -0800
commitf16b249a5e346bd673ba312f71c55f02c6d4a476 (patch)
treea508cb65119b65346d5fdef28bec836659e434b5 /gralloc4/src/hidl_common/RegisteredHandlePool.h
parent6734490de113dfea88f604496ffb4a149e5d0e1c (diff)
parentb0eb37f8d49caa86f61fee461addb20503914947 (diff)
downloadgchips-f16b249a5e346bd673ba312f71c55f02c6d4a476.tar.gz
Merge Android 24Q1 Release (ab/11220357)temp_319669529
Bug: 319669529 Merged-In: Ia09a914932b585ebba0b38fbfebdf75d6d9a7a76 Change-Id: I4216757468b9304fb354a44a9555b53d2e3ecb2c
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;