mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

Currently, we are using 2 copy steps for PixelCopySurfaceCapturerV24: - Copy from the source surface to a similarly sized bitmap (using PixelCopy API). - Copy from the bitmap to a scaled bitmap, based on the given output size, using scaledBitmap API. This CL merges the 2 steps and uses PixelCopy API to perform copy directly from the source surface to the bitmap of the given output size. However, since our test uses scaledBitmap API to create reference bitmap from original image, due to various Bitmap copy optimizations (filtering, antialiasing etc...) that are different between PixelCopy API and scaledBitmap API implementations, the result images cannot be the same. We can perform the our tests by asserting that their PSNR value is very high, which means they are very similar. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=199472005