summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYin-Chia Yeh2017-04-04 14:59:27 -0500
committerYin-Chia Yeh2017-04-04 15:17:54 -0500
commit164ec4ad268bf015060ab57dfa2e1750956de1ca (patch)
treecefd04defe6d6b711d94edb6edfecc26274e3876 /libgrallocusage
parente4b2d28b919c61ee3fdd340a22d73d99d964af2d (diff)
downloadplatform-system-core-164ec4ad268bf015060ab57dfa2e1750956de1ca.tar.gz
platform-system-core-164ec4ad268bf015060ab57dfa2e1750956de1ca.tar.xz
platform-system-core-164ec4ad268bf015060ab57dfa2e1750956de1ca.zip
Revert "Include vendor gralloc0 flags in gralloc1 conversion."
This reverts commit 944e5e0c5276e9149180c316a7d30ad7ef44a284. Test: fix b/36876770 Bug: b/36876770 Change-Id: Ibbf1a5e04ff1f61061cf0bb679306324d1f543d3
Diffstat (limited to 'libgrallocusage')
-rw-r--r--libgrallocusage/GrallocUsageConversion.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/libgrallocusage/GrallocUsageConversion.cpp b/libgrallocusage/GrallocUsageConversion.cpp
index 10e728d52..8164beb80 100644
--- a/libgrallocusage/GrallocUsageConversion.cpp
+++ b/libgrallocusage/GrallocUsageConversion.cpp
@@ -30,17 +30,13 @@ void android_convertGralloc0To1Usage(int32_t usage, uint64_t* producerUsage,
30 /* ProducerUsage::CPU_WRITE_OFTEN | */ 30 /* ProducerUsage::CPU_WRITE_OFTEN | */
31 ProducerUsage::GPU_RENDER_TARGET | ProducerUsage::PROTECTED | 31 ProducerUsage::GPU_RENDER_TARGET | ProducerUsage::PROTECTED |
32 ProducerUsage::CAMERA | ProducerUsage::VIDEO_DECODER | 32 ProducerUsage::CAMERA | ProducerUsage::VIDEO_DECODER |
33 ProducerUsage::SENSOR_DIRECT_DATA | 33 ProducerUsage::SENSOR_DIRECT_DATA;
34 /* Private flags may be consumer or producer */
35 GRALLOC_USAGE_PRIVATE_MASK;
36 constexpr uint64_t CONSUMER_MASK = ConsumerUsage::CPU_READ | 34 constexpr uint64_t CONSUMER_MASK = ConsumerUsage::CPU_READ |
37 /* ConsumerUsage::CPU_READ_OFTEN | */ 35 /* ConsumerUsage::CPU_READ_OFTEN | */
38 ConsumerUsage::GPU_TEXTURE | ConsumerUsage::HWCOMPOSER | 36 ConsumerUsage::GPU_TEXTURE | ConsumerUsage::HWCOMPOSER |
39 ConsumerUsage::CLIENT_TARGET | ConsumerUsage::CURSOR | 37 ConsumerUsage::CLIENT_TARGET | ConsumerUsage::CURSOR |
40 ConsumerUsage::VIDEO_ENCODER | ConsumerUsage::CAMERA | 38 ConsumerUsage::VIDEO_ENCODER | ConsumerUsage::CAMERA |
41 ConsumerUsage::RENDERSCRIPT | ConsumerUsage::GPU_DATA_BUFFER | 39 ConsumerUsage::RENDERSCRIPT | ConsumerUsage::GPU_DATA_BUFFER;
42 /* Private flags may be consumer or producer */
43 GRALLOC_USAGE_PRIVATE_MASK;
44 *producerUsage = static_cast<uint64_t>(usage) & PRODUCER_MASK; 40 *producerUsage = static_cast<uint64_t>(usage) & PRODUCER_MASK;
45 *consumerUsage = static_cast<uint64_t>(usage) & CONSUMER_MASK; 41 *consumerUsage = static_cast<uint64_t>(usage) & CONSUMER_MASK;
46 if ((static_cast<uint32_t>(usage) & GRALLOC_USAGE_SW_READ_OFTEN) == GRALLOC_USAGE_SW_READ_OFTEN) { 42 if ((static_cast<uint32_t>(usage) & GRALLOC_USAGE_SW_READ_OFTEN) == GRALLOC_USAGE_SW_READ_OFTEN) {