Strengthen dataspace guarantees in SurfaceFlinger.
Correctly converting from yuv to rgb in RenderEngine requires that the buffer dataspace is accurate. So, if the dataspace on a layer differs from the buffer then update the dataspace in the buffer's metadata to be consistent. Moreover, some GPU drivers do not perform yuv2rgb in a reasonable way when the dataspace is UNKNOWN. In that case, reauthor the dataspace to be sRGB so that there is consistent behavior for an UNKNOWN dataspace. Finally, some GPU drivers cache gralloc metadata on creation of GPU resources, which is not compliant with gralloc expectations. So that vendors have some time to fix the drivers and so that GSI tests pass, recreate GPU resources when the vendor partition is old and the buffer is a YCbCr format. Bug: 247826480 Test: SurfaceControlTest Change-Id: Iee2641acce3926c826e96c56ececb431868d8598
Loading
Please register or sign in to comment