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

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

Merge "Animated HDR flag cleanup" into main

parents 22fde246 17410bae
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ package android.view;

import android.os.SystemClock;

import com.android.graphics.hwui.flags.Flags;

import java.util.function.Consumer;

/** @hide */
@@ -27,8 +25,6 @@ class HdrRenderState implements Consumer<Display> {
    // Targeting an animation from 1x to 5x over 400ms means we need to increase by 0.01/ms
    private static final float TRANSITION_PER_MS = 0.01f;

    private static final boolean FLAG_ANIMATE_ENABLED = Flags.animateHdrTransitions();

    private final ViewRootImpl mViewRoot;

    private boolean mIsHdrEnabled = false;
@@ -77,7 +73,7 @@ class HdrRenderState implements Consumer<Display> {
        long timeDelta = Math.max(Math.min(32, frameTimeMillis - mLastUpdateMillis), 8);
        final float maxStep = timeDelta * TRANSITION_PER_MS;
        mLastUpdateMillis = frameTimeMillis;
        if (hasUpdate && FLAG_ANIMATE_ENABLED) {
        if (hasUpdate) {
            if (isHdrEnabled()) {
                float delta = mTargetHdrSdrRatio - mPreviousRenderRatio;
                if (delta > maxStep) {
@@ -127,7 +123,7 @@ class HdrRenderState implements Consumer<Display> {
        mLastUpdateMillis = SystemClock.uptimeMillis();
        if (desiredRatio != mTargetDesiredHdrSdrRatio) {
            mTargetDesiredHdrSdrRatio = desiredRatio;
            if (mTargetDesiredHdrSdrRatio > mDesiredHdrSdrRatio || !FLAG_ANIMATE_ENABLED) {
            if (mTargetDesiredHdrSdrRatio > mDesiredHdrSdrRatio) {
                mDesiredHdrSdrRatio = mTargetDesiredHdrSdrRatio;
            }
            forceUpdateHdrSdrRatio();
+0 −7
Original line number Diff line number Diff line
@@ -89,13 +89,6 @@ flag {
  bug: "292545615"
}

flag {
  name: "animate_hdr_transitions"
  namespace: "core_graphics"
  description: "Automatically animate all changes in HDR headroom"
  bug: "314810174"
}

flag {
  name: "draw_region"
  namespace: "core_graphics"