gralloc: Add option for unaligned NV21_ZSL pixel format
* Not sure why this is a thing but on some devices
(eg. Samsung Galaxy Tab S5e) aligning NV21_ZSL to
64 results in invalid width and height.
Change-Id: I8611752798a8c66ba55d52d826aa532fd76abe33
diff --git a/gralloc/Android.mk b/gralloc/Android.mk
index 4dffade..c3f4133 100644
--- a/gralloc/Android.mk
+++ b/gralloc/Android.mk
@@ -46,6 +46,10 @@
LOCAL_CFLAGS += -DUSE_YCRCB_CAMERA_PREVIEW_VENUS
endif
+ifeq ($(TARGET_USES_UNALIGNED_NV21_ZSL),true)
+ LOCAL_CFLAGS += -DUSE_UNALIGNED_NV21_ZSL
+endif
+
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
LOCAL_SRC_FILES := gr_utils.cpp gr_adreno_info.cpp
include $(BUILD_SHARED_LIBRARY)