summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-14 21:47:59 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-14 21:47:59 +0000
commit038e56feee121dbe7ca5c1590e5dfce0b68f8a55 (patch)
tree1e99bad13296dd99915274252d44431209dc3ee2
parent611baaca06e266cd8f01589da41af7f1a4d5af18 (diff)
parent51112a34d21e8fe65cf48e979591b4446dceb10c (diff)
downloadgchips-038e56feee121dbe7ca5c1590e5dfce0b68f8a55.tar.gz
Merge cherrypicks of ['googleplex-android-review.googlesource.com/22075424'] into udc-release.
Change-Id: I11a4f379060f0ef36a5bc0d36d1f46d671bedc20
-rw-r--r--gralloc4/src/core/mali_gralloc_formats.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/gralloc4/src/core/mali_gralloc_formats.cpp b/gralloc4/src/core/mali_gralloc_formats.cpp
index dcc527a..402d138 100644
--- a/gralloc4/src/core/mali_gralloc_formats.cpp
+++ b/gralloc4/src/core/mali_gralloc_formats.cpp
@@ -1430,25 +1430,20 @@ uint32_t get_base_format(const uint64_t req_format,
{
base_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN;
}
- else if ((usage & GRALLOC_USAGE_HW_TEXTURE) && (usage & GRALLOC_USAGE_HW_CAMERA_WRITE))
+ else if (usage & GRALLOC_USAGE_HW_CAMERA_WRITE)
{
- // Camera flexible YUV format output maps to NV21.
- base_format = HAL_PIXEL_FORMAT_YCrCb_420_SP;
- }
- else if (usage & (GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE))
- {
- base_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN;
- }
- else if ((usage & GRALLOC_USAGE_HW_CAMERA_WRITE) &&
- (usage & GRALLOC_USAGE_HW_CAMERA_READ) &&
- (usage & GRALLOC_USAGE_PROTECTED))
- {
- // Faceauth requires NV21 format
+ // Catchall for camera write. DO NOT CHANGE WITHOUT TESTING THESE SCENARIOS:
+ // 1. Camera capture and initial photo processing
+ // 2. Other major camera operations - video recording, portrait etc
+ // 3. Faceauth
+ // 4. Multi-profile user photo add
+ // 5. Capture and resize - use chat app to capture a photo
+ // Re-run these steps with GPU composition:
+ // adb shell service call SurfaceFlinger 1008 i32 1
base_format = HAL_PIXEL_FORMAT_YCrCb_420_SP;
}
else
{
- // Flexible framework-accessible YUV format;
base_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN;
}
}