Commit Graph

3 Commits

Author SHA1 Message Date
Yin-Chia Yeh 164ec4ad26 Revert "Include vendor gralloc0 flags in gralloc1 conversion."
This reverts commit 944e5e0c52.

Test: fix b/36876770
Bug: b/36876770
Change-Id: Ibbf1a5e04ff1f61061cf0bb679306324d1f543d3
2017-04-04 13:17:54 -07:00
Eino-Ville Talvala 944e5e0c52 Include vendor gralloc0 flags in gralloc1 conversion.
Map GRALLOC_USAGE_PRIVATE_* fields into bits 28-31 of both producer
and consumer usage for gralloc1.

Test: Camera output works as normal, CTS not regressed
Bug: 35215313
Change-Id: I0736e0f513b193373b822830dbb0efe3f4263770
2017-03-29 12:08:55 -07:00
Jesse Hall 33eab3a829 Add gralloc usage conversion functions
Converting gralloc1 / ..graphics.allocator@2.0 usage to gralloc0 usage
requires more than just ORing bits and truncating: the CPU_READ_OFTEN
bits don't match up correctly. Add utility functions for converting
back and forth which handle this properly.

Test: boot bullhead-eng
Change-Id: I1cee972feaea486d5607c60acead2e870c2c9549
2017-03-28 08:22:54 -07:00