graphics: add mapper HAL support library
Add a header-only support library android.hardware.graphics.mapper@2.0-hal that can be used by implementations. There are two classes in the support library. MapperHal is an abstract class to be implemented by implementations. Mapper is an implementation of HIDL IMapper interface on top of MapperHal. An implementation can class VendorHal : public MapperHal { ... }; auto mapper = std::make_unique<Mapper>(); mapper->init(std::make_unique<VendorHal>(...)); Or, if vendor extensions are to be added to the IMapper, class MapperHalExt : public MapperHal { ... }; class VendorHal : public MapperHalExt { ... }; class MapperExt : public MapperImpl<IMapperExt, MapperHalExt> { ... }; auto mapper = std::make_unique<MapperExt>(); mapper->init(std::make_unique<VendorHal>(...)); Test: builds Change-Id: Ib23c1f5977744f7e116bb93db53e882e2dad7ce3
Loading
Please register or sign in to comment