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

Commit 7c7ede2f authored by Daniel Solomon's avatar Daniel Solomon
Browse files

SF: Update forced composition color space along with color mode

Currently, a forced composition color space (ColorMode) can be set by
the device via a persistent property. However, this property is read
only during init, while some DisplayColorSetting values, which can
change during runtime, require a specific ColorMode to be set
simultaneously.

This change adds the ability to specify a ColorMode in the same binder
transaction that is used to set DisplayColorSetting. If a ColorMode is
unspecified during the transaction, the current forced ColorMode is
unchanged.

Bug: 137140317
Bug: 137053654
Change-Id: I35bb292fbe70f944f509f7d34ef965adb66ca059
parent ee07312a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5405,7 +5405,12 @@ status_t SurfaceFlinger::onTransact(uint32_t code, const Parcel& data, Parcel* r
                return NO_ERROR;
            }
            case 1023: { // Set native mode
                int32_t colorMode;

                mDisplayColorSetting = static_cast<DisplayColorSetting>(data.readInt32());
                if (data.readInt32(&colorMode) == NO_ERROR) {
                    mForceColorMode = static_cast<ColorMode>(colorMode);
                }
                invalidateHwcGeometry();
                repaintEverything();
                return NO_ERROR;