u_gralloc/mapper4: properly expose ChromaSiting types based on api level
ChromaSiting::COSITED_VERTICAL and ChromaSiting::COSITED_BOTH only exist
in api level 35 and above.
Fixes: 64d18f84b0 ("u_gralloc/mapper4: fill u_gralloc_buffer_color_info properly")
Reported-by: Alessandro Astone <ales.astone@gmail.com>
Reviewed-by: Alessandro Astone <ales.astone@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36277>
This commit is contained in:
@@ -238,6 +238,7 @@ mapper4_get_buffer_color_info(struct u_gralloc *gralloc,
|
||||
out->horizontal_siting = __DRI_YUV_CHROMA_SITING_0;
|
||||
out->vertical_siting = __DRI_YUV_CHROMA_SITING_0_5;
|
||||
break;
|
||||
#if ANDROID_API_LEVEL >= 35
|
||||
case ChromaSiting::COSITED_VERTICAL:
|
||||
out->horizontal_siting = __DRI_YUV_CHROMA_SITING_0_5;
|
||||
out->vertical_siting = __DRI_YUV_CHROMA_SITING_0;
|
||||
@@ -246,6 +247,7 @@ mapper4_get_buffer_color_info(struct u_gralloc *gralloc,
|
||||
out->horizontal_siting = __DRI_YUV_CHROMA_SITING_0;
|
||||
out->vertical_siting = __DRI_YUV_CHROMA_SITING_0;
|
||||
break;
|
||||
#endif
|
||||
case ChromaSiting::SITED_INTERSTITIAL:
|
||||
default:
|
||||
out->horizontal_siting = __DRI_YUV_CHROMA_SITING_0_5;
|
||||
|
||||
Reference in New Issue
Block a user