summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetsProvider.cpp
diff options
context:
space:
mode:
author Jordan Demeulenaere <jdemeulenaere@google.com> 2022-07-14 11:53:58 +0200
committer Jordan Demeulenaere <jdemeulenaere@google.com> 2022-07-18 16:43:44 +0200
commit170bf9e8125a70b05247a6225e9320b574015b94 (patch)
tree54168015d7a3162031f9f4be87a4986c563741d6 /libs/androidfw/AssetsProvider.cpp
parent1f147b4822337d7370eb5996b28495f39a36fccf (diff)
Render View into Bitmap using hardware acceleration (1/2)
This CLs switches the screenshot tests to render using hardware rendering rather than software rendering. The reason for this is that some features are not supported in software rendering (like clipping to an outline). Even though hardware rendering are not meant to be 100% deterministic (e.g. shadows and ripples), I'd like us to try to still go for pixel-perfect matching of screenshots whenever possible, especially given that we don't really care about testing things like shadows/elevation. In the future, we might either use software rendering or more lenient matchers in case we want to test some UIs that are impossible to make deterministic. Because the AndroidX View.captureToBitmap() API unfortunately does not work for dialogs (see b/195673633), I had to fork ViewCapture.kt and WindowCapture.kt to ensure that we use the correct window we are sending over to PixelCopy for the hardware rendering. Bug: 230832101 Test: atest SystemUIGoogleScreenshotTests Change-Id: I8cb6398c0c446b754d5c1af27296a18d53ce738e
Diffstat (limited to 'libs/androidfw/AssetsProvider.cpp')
0 files changed, 0 insertions, 0 deletions