Revise IAllocator and IMapper to reduce IPC and to support gralloc0
devices.
Specifically, IAllocator is trimmed down to have essentially only
allocate(BufferDescriptor descriptor, uint32_t count)
generates (Error error,
uint32_t stride,
vec<handle> buffers);
The ability to allocate buffers with shared backing store is
removed. ProducerUsage and ConsumerUsage are moved to the
graphics.common package and are merged and renamed to BufferUsage.
BufferUsage's bits follow gralloc0.
IMapper gains
typedef vec<uint32_t> BufferDescriptor;
createDescriptor(BufferDescriptorInfo descriptorInfo)
generates (Error error,
BufferDescriptor descriptor);
where BufferDescriptor is an implementation-defined blob. lockFlex
is replaced by lockYCbCr. All getters are removed.
Reference counting with retain/release is replaced by
importBuffer/freeBuffer.
Most if not all gralloc1 features are not used by the runtime yet.
There is also not too much test written for them. As such, they
tend to behave differently between implementations and cannot be
used reliably.
Bug: 36481301
Test: builds and boots on Pixel
Change-Id: I1d31105120517ea2c128c7a19297acf3bfd312bb
This has been copy pasted and isn't actually required.
Test: all hals manually tested to work on internal marlin (which have them binderized).
Note: tv hals not tested (and they never have been). Filed b/36562029
Note: for thermal hal, could only run VTS/check logs for errors.
Test: lshal outputs proper stuff
Fixes: 31928447
Change-Id: Id1be584dc0fa2d70e9189b922335146bf6d1382d
Remove undeclared dependency of libhwcomposer-client on Hwc.h which
created a circular dependency.
Test: Manual
Change-Id: I74d5c4e2db5d247f8b406d1ea42fece41e76659d
We cannot lookup _and_ update buffer cache entry in lookupBuffer.
The old buffer is still in use by hwcomposer2. Add updateBuffer to
do the update after the new buffer has replaced the old buffer in
hwcomposer2.
While at it, s/BufferClone/BufferCacheEntry/g.
Bug: 36064845
Test: manual
Change-Id: I59b61c0198ad528c40020fdebbe27a6cc359226f
Perform a final presentDisplay to clear the screen and get HWC2 out
of any special state (e.g., some implementations put themselves in
special states between validateDisplay and presentDisplay). Our
only portable choice really is to abort(), but that is not an option
because we have other clients such as VTS or VR.
Bug: 35872161
Test: manual
Change-Id: I9028705607d1b86d418a379c6e90e833d638b3f5
Add libVtsHalGraphicsComposerUtils which provides a wrapper to
IComposer. Port tests to be based on
libVtsHalGraphicsComposerUtils.
Test: manual
Change-Id: I400c347b54702c3d45954e6cdc101d3dc1241efd
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds
Bug: 33844934
Change-Id: I0c7987ffa7b22bb7386a4a1320242b3248e434e4
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds
Bug: 33844934
Change-Id: Ic3859ccf21e7ee5177f47cb06e3e0c93dd572bf6
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds
Bug: 33844934
Change-Id: I3d51429681d834f53dc5f6765e97675eafdceda4
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.
Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
Make IComposer default implementation use the same process scheduler
as SurfaceFlinger does.
Bug: 35210697
Test: manual
Change-Id: Ie2ebe1d3fd26505984d9f6c33d63b5db36b0b64a
It is always on now and all buffers be cloned and registered.
Clients (SF) should make use of the buffer caching mechanism and
pass each unique buffer once, to avoid the overhead.
Test: manual
Change-Id: I74ccbf74e110c8b413a66cfc60044b71ba3f44e3
Decouples the ComposerClient code which deals with parsing the command buffer
messages sent by SurfaceFlinger from the Hwc code that handles the
commands.
Bug: 33297270
Test: Compiled and verified on device that hwcomposer-2-1 service can
start correctly. SurfaceFlinger can connect to the service and the
system boots up. Also verified SurfaceFlinger runs correctly without
hwcomposer-2-1.
Change-Id: I43357306caea57d262735f4756c379ba9d0138cd
CommandWriter will be used as a base class in extensions of HWC. Renamed
for consistency.
Bug: 33297385
Test: Compiled
Change-Id: Iabe59f37157062961b916d55108cb9f4fb792619
Rewrite libgralloc1-adapter to be based on Gralloc1On0Adapter.
Previously, the adapter targeted maximum portability and maximum
performance. The rewritten adapter targets ease of use instead.
This also fixes a bug in the adapter's GRALLOC1_FUNCTION_RELEASE. The
function does not imply native_handle_close/native_handle_delete. As a
result, IMapper and IComposer are also fixed to close/delete handles.
Test: builds and boots
Change-Id: I5c071453dc950583087ae07967bca2c22866c538