OSDN Git Service
Fix GRALLOC1_PFN_LOCK_FLEX multithread issue.
lockFlex fills outFlexLayout->planes with pointer to global variable,
doesn't work from multiple threads.
Solution: rely that caller allocates needed planes structures,
just use them for output.
gralloc1.h about GRALLOC1_PFN_GET_NUM_FLEX_PLANES:
This may be used to efficiently allocate only as many plane structures as necessary before calling into lockFlex.
It means that lockFlex caller is responsible for outFlexLayout->planes allocation.
It also demand fix in GRALLOC1_PFN_GET_NUM_FLEX_PLANES:
should return 3 for HAL_PIXEL_FORMAT_NV12_TILED_INTEL.
Jira: None
Test: check memory regions mapped from different threads don't overlap