Fix seaming issue in BitmapRegionDecoder for gainmaps
Rounding discrepancies in the image codec infrastructure was allowing gainmaps to be decoded with a 1px border on the edge, which introduces visible seams when zooming into large images. Fix this by adjusting how computing the desired gainmap subregion size, by pretending we downsample first, then compute the subregion size based on that. Add a long paragraph explaining why we have to do this with an example, because it's not entirely intuitive. Also adjust how we poke at the gainmap resampling flag, since some CTS tests run before RenderThread starts up and intializes the properties. Bug: 371123308 Flag: com.android.graphics.hwui.flags.resample_gainmap_regions Test: Decoding in Photos and Files Test: GainmapTest Change-Id: Id608c5838f7890d0304b040e13d7281aa879a75c
Loading
Please register or sign in to comment