Переглянути джерело

cupid: overlay: Redo cutout overlays

Xiaomi for some reason uses mainBuiltInDisplayCutoutRectApproximation
as mainBuiltInDisplayCutout. Let's create a new mainBuiltInDisplayCutout,
make it a circle and fill it to avoid aliasing in the cutout area.

Change-Id: I9b822cdb79f72daaa0a334bfbee98ad255dfd04d
Signed-off-by: Jens Reidel <[email protected]>
AdarshGrewal 3 роки тому
батько
коміт
4eb911b64f
1 змінених файлів з 14 додано та 1 видалено
  1. 14 1
      overlay/Frameworks/res/values/config.xml

+ 14 - 1
overlay/Frameworks/res/values/config.xml

@@ -28,7 +28,20 @@
 
          @see https://www.w3.org/TR/SVG/paths.html#PathData
          -->
-    <string name="config_mainBuiltInDisplayCutout" translatable="false">M 0,0 H -33 V 87 H 33 V 0 H 0 Z</string>
+    <string name="config_mainBuiltInDisplayCutout" translatable="false">M -33 52 a 33 33 0 1 0 66 0 a 33 33 0 1 0 -66 0 Z</string>
+
+    <!--Like config_mainBuiltInDisplayCutout, but this path is used to report the
+        one single bounding rect per device edge to the app via
+        {@link DisplayCutout#getBoundingRect}. Note that this path should try to match the visual
+        appearance of the cutout as much as possible, and may be smaller than
+        config_mainBuiltInDisplayCutout
+        -->
+    <string name="config_mainBuiltInDisplayCutoutRectApproximation">M 0,0 H -33 V 87 H 33 V 0 H 0 Z</string>
+
+    <!--Whether the display cutout region of the main built-in display should be forced to
+        black in software (to avoid aliasing or emulate a cutout that is not physically existent).
+        -->
+    <bool name="config_fillMainBuiltInDisplayCutout">true</bool>
 
     <!-- How long it takes for the HW to start illuminating after the illumination is requested. -->
     <integer name="config_udfps_illumination_transition_ms">0</integer>