The default implementatoin is built on top of conventional gralloc1.
Test: make android.hardware.graphics.mapper.hallib
Change-Id: I8647dc69dbb1637a141d36358d5769f450422ac1
IMapper is loaded in-process and is defined in C++ instead of HIDL. To
guarantee binary compability, the interface is a struct of function
pointers instead of a class of pure virtual member functions. The
functions pointed to by the function pointers must also have C-linkage and
have all of their parameters PODs.
Implementations are expected to be installed to
/oem/lib/hw/android.hardware.graphics.mapper.hallib.so
/vendor/lib/hw/android.hardware.graphics.mapper.hallib.so
/system/lib/hw/android.hardware.graphics.mapper.hallib.so
(lib64 instead of lib for 64-bit implementations)
The loader will look for the symbol "HALLIB_FETCH_Interface" and use it to
fetch the interface.
Test: make android.hardware.graphics.mapper@2.0
Change-Id: I3a2c7a6ce18a90adda6df2d89559c957a122fdf0
The default implementatoin is built on top of conventional gralloc1.
This also adds a static library, libgralloc1-adapter. It is intended to
ease the porting of gralloc0 to gralloc1.
Test: booted to launcher, tested with YouTube and some games.
Change-Id: Id640b1d5a1e1eea1aafabb6c134e6be6e71afff5
It differs from gralloc1.h in that
- buffer descriptors are created from a struct, BufferDescriptorInfo, to
reduce round trips
- testAllocate is a function of its own
- buffer allocation and export are two different steps
- reference counting and buffer mapping are moved to gralloc-mapper
- BAD_HANDLE is renamed to BAD_BUFFER
- GRALLOC1_CONSUMER_USAGE_FOREIGN_BUFFERS is removed
- CPU_{READ,WRITE}_OFTEN no longer implies CPU_{READ,WRITE}
Test: make android.hardware.graphics.allocator@2.0
Change-Id: Ibe9367d5b1701c0e1009da829f27fed0f7d98828