Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b42f171a authored by Chia-I Wu's avatar Chia-I Wu
Browse files

libui: clean up GraphicBuffer interface

Other than transferring the ownership, some callers want to control
whether to register or to clone the handle when creating a
GraphicBuffer from a handle.  Add a new constructor with
HandleWrapMethod for finer controls, to replace the one that has
only a boolean, keepOwnership.

The motivation is to enable users to construct GraphicBuffer without
fighting with GraphicBufferMapper::registerBuffer first.  More
generally, GraphicBufferMapper::{registerBuffer,unregisterBuffer} is
tricky to use correctly.  They should really be considered private
by most.

While at it, deprecate constructors that do not distinguish
producer/consumer usage.  It turns out GraphicBuffer is used by some
proprietary libraries.  I have to maintain the ABI and cannot remove
the deprecated constructors.

Bug: 36355756
Test: boots
Change-Id: Ieea618d8495f06a6233299d076fb821127cd6bf8
parent 0e7305cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment