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

Commit 8f752e79 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Speed up HDR headroom transitions" into main

parents a71a3802 8bc5dcd8
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -1978,6 +1978,11 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                        || !isDisplayContentVisible || brightnessIsTemporary;
                        || !isDisplayContentVisible || brightnessIsTemporary;
                if (!skipAnimation && BrightnessSynchronizer.floatEquals(
                if (!skipAnimation && BrightnessSynchronizer.floatEquals(
                        sdrAnimateValue, currentSdrBrightness)) {
                        sdrAnimateValue, currentSdrBrightness)) {
                    // SDR brightness is unchanged, so animate quickly as this is only impacting
                    // a likely minority amount of display content
                    // ie, the highlights of an HDR video or UltraHDR image
                    slowChange = false;

                    // Going from HDR to no HDR; visually this should be a "no-op" anyway
                    // Going from HDR to no HDR; visually this should be a "no-op" anyway
                    // as the remaining SDR content's brightness should be holding steady
                    // as the remaining SDR content's brightness should be holding steady
                    // due to the sdr brightness not shifting
                    // due to the sdr brightness not shifting
+5 −0
Original line number Original line Diff line number Diff line
@@ -1601,6 +1601,11 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal
                        || !isDisplayContentVisible || brightnessIsTemporary;
                        || !isDisplayContentVisible || brightnessIsTemporary;
                if (!skipAnimation && BrightnessSynchronizer.floatEquals(
                if (!skipAnimation && BrightnessSynchronizer.floatEquals(
                        sdrAnimateValue, currentSdrBrightness)) {
                        sdrAnimateValue, currentSdrBrightness)) {
                    // SDR brightness is unchanged, so animate quickly as this is only impacting
                    // a likely minority amount of display content
                    // ie, the highlights of an HDR video or UltraHDR image
                    slowChange = false;

                    // Going from HDR to no HDR; visually this should be a "no-op" anyway
                    // Going from HDR to no HDR; visually this should be a "no-op" anyway
                    // as the remaining SDR content's brightness should be holding steady
                    // as the remaining SDR content's brightness should be holding steady
                    // due to the sdr brightness not shifting
                    // due to the sdr brightness not shifting