diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-15 02:49:51 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-15 02:49:51 +0000 |
commit | 2c6799d984133ff0e175946ae0deef2587873f07 (patch) | |
tree | e7b36692e4bd7e1323cb87614a53ec3e65ae3e07 | |
parent | b4f328ccfc9032ae4d228199220c5a6bdc58eec2 (diff) | |
parent | bf023e20388062eaddf20666347437b9ae2583d2 (diff) |
Merge cherrypicks of ['googleplex-android-review.googlesource.com/22075424'] into udc-release.
Change-Id: Ie375b949795834fdc1da4a4b650a8b9fb343b548
-rw-r--r-- | gralloc4/src/core/mali_gralloc_formats.cpp | 23 |
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; } } |