Revert "Include vendor gralloc0 flags in gralloc1 conversion."

This reverts commit 944e5e0c52.

Test: fix b/36876770
Bug: b/36876770
Change-Id: Ibbf1a5e04ff1f61061cf0bb679306324d1f543d3
This commit is contained in:
Yin-Chia Yeh 2017-04-04 12:59:27 -07:00
parent e4b2d28b91
commit 164ec4ad26

View file

@ -30,17 +30,13 @@ void android_convertGralloc0To1Usage(int32_t usage, uint64_t* producerUsage,
/* ProducerUsage::CPU_WRITE_OFTEN | */
ProducerUsage::GPU_RENDER_TARGET | ProducerUsage::PROTECTED |
ProducerUsage::CAMERA | ProducerUsage::VIDEO_DECODER |
ProducerUsage::SENSOR_DIRECT_DATA |
/* Private flags may be consumer or producer */
GRALLOC_USAGE_PRIVATE_MASK;
ProducerUsage::SENSOR_DIRECT_DATA;
constexpr uint64_t CONSUMER_MASK = ConsumerUsage::CPU_READ |
/* ConsumerUsage::CPU_READ_OFTEN | */
ConsumerUsage::GPU_TEXTURE | ConsumerUsage::HWCOMPOSER |
ConsumerUsage::CLIENT_TARGET | ConsumerUsage::CURSOR |
ConsumerUsage::VIDEO_ENCODER | ConsumerUsage::CAMERA |
ConsumerUsage::RENDERSCRIPT | ConsumerUsage::GPU_DATA_BUFFER |
/* Private flags may be consumer or producer */
GRALLOC_USAGE_PRIVATE_MASK;
ConsumerUsage::RENDERSCRIPT | ConsumerUsage::GPU_DATA_BUFFER;
*producerUsage = static_cast<uint64_t>(usage) & PRODUCER_MASK;
*consumerUsage = static_cast<uint64_t>(usage) & CONSUMER_MASK;
if ((static_cast<uint32_t>(usage) & GRALLOC_USAGE_SW_READ_OFTEN) == GRALLOC_USAGE_SW_READ_OFTEN) {