summaryrefslogtreecommitdiff
path: root/libs/nativewindow/AHardwareBuffer.cpp
diff options
context:
space:
mode:
author Chris Forbes <chrisforbes@google.com> 2022-01-26 18:48:55 +1300
committer Chris Forbes <chrisforbes@google.com> 2022-01-29 06:56:27 +1300
commit6c09ee7f4ec0c38766f6de2ad922d85a5035f565 (patch)
tree117f8f4f0a8d46800ec5ba86c3e567746d6d94c7 /libs/nativewindow/AHardwareBuffer.cpp
parenta9ff73831c26cb01e5164f3dd19c4c5b6307f9ae (diff)
gralloc: Move validation of non-blob/gpu_data_buffer down to libui
AIDL gralloc implementations may choose to support this combination. Existing implementations of HIDL gralloc 2/3/4 do not support it, and do not reliably reject it due to having been previously protected by validation at the AHardwareBuffer layer. Move the check down to the gralloc layer, and defer to the HAL only in the AIDL case. Bug: b/195944622 Test: build; real CTS/VTS to land soon after. Change-Id: I7b0b9de005a9b0f564915f9c71cc8aea3ef0618a
Diffstat (limited to 'libs/nativewindow/AHardwareBuffer.cpp')
-rw-r--r--libs/nativewindow/AHardwareBuffer.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/libs/nativewindow/AHardwareBuffer.cpp b/libs/nativewindow/AHardwareBuffer.cpp
index cb3361b431..2578ee8467 100644
--- a/libs/nativewindow/AHardwareBuffer.cpp
+++ b/libs/nativewindow/AHardwareBuffer.cpp
@@ -509,10 +509,6 @@ bool AHardwareBuffer_isValidDescription(const AHardwareBuffer_Desc* desc, bool l
ALOGE_IF(log, "AHARDWAREBUFFER_USAGE_SENSOR_DIRECT_DATA requires AHARDWAREBUFFER_FORMAT_BLOB");
return false;
}
- if (desc->usage & AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER) {
- ALOGE_IF(log, "AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER requires AHARDWAREBUFFER_FORMAT_BLOB");
- return false;
- }
}
if ((desc->usage & (AHARDWAREBUFFER_USAGE_CPU_READ_MASK | AHARDWAREBUFFER_USAGE_CPU_WRITE_MASK)) &&