OSDN Git Service

DisplayCutout: Draw anti-aliased bounds in soft overlay
authorAdrian Roos <roosa@google.com>
Tue, 10 Apr 2018 22:17:08 +0000 (15:17 -0700)
committerAdrian Roos <roosa@google.com>
Wed, 11 Apr 2018 16:12:29 +0000 (16:12 +0000)
commit51072a8b6faf6a92dfe3f063caa5fe645c3d8440
tree73d9e80b02718117dd996ae12171db5d1a203172
parent42a53783f5e9472defe5004ecc8c980875da05c0
DisplayCutout: Draw anti-aliased bounds in soft overlay

To do so, we cannot use the Region from DisplayCutout, because it is conceptionally
a binary Bitmap. Instead, we need the exact curve as a Path.

Also fixes a theoretical bug where the DisplayCutout
was cached even though the display height changed.

Change-Id: I9356f4589186fedc5dc95010c7bd1a1fa20edf5e
Fixes: 77868940
Test: Enable display cutout in developer options, verify the edges look smoth and not jagged.
Test: atest DisplayCutoutTest
core/java/android/view/DisplayCutout.java
core/tests/coretests/src/android/view/DisplayCutoutTest.java
packages/SystemUI/src/com/android/systemui/ScreenDecorations.java