rosemary: Set up display color compositions

* Add natural, boosted, saturated and adaptive color modes
* Switch to "Adaptive" mode and Display P3 color by default
* Use default color mode for Natural and Boosted
* Rest of configuration is kanged off Pixel's overlay

Signed-off-by: CodeChas3r1 <codechas3r@gmail.com>
Signed-off-by: Stella Bloom <windowz414@gnuweeb.org>
This commit is contained in:
Albert I
2023-07-14 08:13:22 +08:00
committed by Stella Bloom
parent 9931a31226
commit eefedbb10b
2 changed files with 42 additions and 0 deletions

View File

@@ -505,4 +505,41 @@
<item>910</item> <!-- sensorLocationY -->
<item>100</item> <!-- sensorRadius -->
</array>
<!-- List supported color modes. -->
<integer-array name="config_availableColorModes">
<item>0</item> <!-- COLOR_MODE_NATURAL -->
<item>1</item> <!-- COLOR_MODE_BOOSTED -->
<item>3</item> <!-- COLOR_MODE_AUTOMATIC -->
</integer-array>
<!-- Color mode to use when accessibility transforms are enabled. This color mode must be
supported by the device, but not necessarily appear in config_availableColorModes. The
regularly selected color mode will be used if this value is negative. -->
<integer name="config_accessibilityColorMode">2</integer>
<!-- The following two arrays specify which color space to use for display composition when a
certain color mode is active.
Composition color spaces are defined in android.view.Display.COLOR_MODE_xxx, and color
modes are defined in ColorDisplayManager.COLOR_MODE_xxx and
ColorDisplayManager.VENDOR_COLOR_MODE_xxx.
The color space COLOR_MODE_DEFAULT (0) lets the system select the most appropriate
composition color space for currently displayed content. Other values (e.g.,
COLOR_MODE_SRGB) override system selection; these other color spaces must be supported by
the device for for display composition.
If a color mode does not have a corresponding color space specified in this array, the
currently set composition color space will not be modified.-->
<integer-array name="config_displayCompositionColorModes">
<item>0</item> <!-- COLOR_MODE_NATURAL -->
<item>1</item> <!-- COLOR_MODE_BOOSTED -->
<item>3</item> <!-- COLOR_MODE_AUTOMATIC -->
</integer-array>
<integer-array name="config_displayCompositionColorSpaces">
<item>0</item> <!-- COLOR_MODE_DEFAULT -->
<item>0</item> <!-- COLOR_MODE_DEFAULT -->
<item>0</item> <!-- COLOR_MODE_DEFAULT -->
<item>9</item> <!-- COLOR_MODE_DISPLAY_P3 -->
</integer-array>
</resources>

View File

@@ -122,6 +122,11 @@ persist.vendor.max.brightness=500
ro.vendor.colorpick_adjust=true
ro.vendor.cabc.enable=true
# Colors
persist.sys.sf.color_saturation=1.1
persist.sys.sf.color_mode=9
persist.sys.sf.native_mode=2
# FM Radio
persist.vendor.connsys.fm_chipid=mt6631