Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit edc27eec authored by Alec Mouri's avatar Alec Mouri
Browse files

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
parent 06af5c8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment