Add DEBUG flag for rounded corner and display cutout path

There wasn't a good approach for engineers to distignlish bounds between
H/W display component and S/W anti-aliasing.

Allow enable color to review the anti-aliasing effect.

Test: adb root; adb shell setprop debug.screenshot_rounded_corners true;
Test: adb shell pidof com.android.systemui|xargs -i adb shell kill -9 {}
Test: check visual following above steps
Test: atest SystemUITests
Test: atest ScreenDecorationsTest
Bug: 149721168

Change-Id: I87f04b50945e1500babdf9fa7ba9cdb37010fde8
This commit is contained in:
Bill Lin
2020-02-18 15:00:39 +08:00
parent 1ad9e57d97
commit 3bf9ca2727

View File

@@ -96,6 +96,7 @@ public class ScreenDecorations extends SystemUI implements Tunable {
private static final boolean DEBUG_SCREENSHOT_ROUNDED_CORNERS =
SystemProperties.getBoolean("debug.screenshot_rounded_corners", false);
private static final boolean VERBOSE = false;
private static final boolean DEBUG_COLOR = DEBUG_SCREENSHOT_ROUNDED_CORNERS;
private DisplayManager mDisplayManager;
private boolean mIsRegistered;
@@ -454,6 +455,9 @@ public class ScreenDecorations extends SystemUI implements Tunable {
private void updateColorInversion(int colorsInvertedValue) {
int tint = colorsInvertedValue != 0 ? Color.WHITE : Color.BLACK;
if (DEBUG_COLOR) {
tint = Color.RED;
}
ColorStateList tintList = ColorStateList.valueOf(tint);
if (mOverlays == null) {