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

Skip to content
Commit 170bf9e8 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

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
parent 1f147b48
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment