libui: add notes to registerBuffer(buffer_handle_t)
The method is semi-broken on gralloc0 devices. It calls down to
Gralloc1On0Adapter::managementHook, which will return
GRALLOC1_ERROR_BAD_HANDLE when the handle is received from a remote
process.
Test: make
Change-Id: Ia0ca2b51e38e8afe66a917ca7fe2282db3968f53
diff --git a/include/ui/GraphicBufferMapper.h b/include/ui/GraphicBufferMapper.h
index 8e93f72..001769f 100644
--- a/include/ui/GraphicBufferMapper.h
+++ b/include/ui/GraphicBufferMapper.h
@@ -39,7 +39,9 @@
public:
static inline GraphicBufferMapper& get() { return getInstance(); }
+ // This may NOT work on devices without a valid Gralloc2::Mapper.
status_t registerBuffer(buffer_handle_t handle);
+
status_t registerBuffer(const GraphicBuffer* buffer);
status_t unregisterBuffer(buffer_handle_t handle);