Merge "Fix HDR blownout issue in the Photos app with HDR display on." into udc-dev am: 059a0275d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23563190 Change-Id: I7ad71426e2ff9338ae960eb9288605928c7a2ef9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -5459,7 +5459,7 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateRenderHdrSdrRatio() {
|
private void updateRenderHdrSdrRatio() {
|
||||||
mRenderHdrSdrRatio = mDisplay.getHdrSdrRatio();
|
mRenderHdrSdrRatio = Math.min(mDesiredHdrSdrRatio, mDisplay.getHdrSdrRatio());
|
||||||
mUpdateHdrSdrRatioInfo = true;
|
mUpdateHdrSdrRatioInfo = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5487,22 +5487,14 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
mHdrSdrRatioChangedListener = null;
|
mHdrSdrRatioChangedListener = null;
|
||||||
} else {
|
} else {
|
||||||
mHdrSdrRatioChangedListener = display -> {
|
mHdrSdrRatioChangedListener = display -> {
|
||||||
setTargetHdrSdrRatio(display.getHdrSdrRatio());
|
updateRenderHdrSdrRatio();
|
||||||
|
invalidate();
|
||||||
};
|
};
|
||||||
mDisplay.registerHdrSdrRatioChangedListener(mExecutor, mHdrSdrRatioChangedListener);
|
mDisplay.registerHdrSdrRatioChangedListener(mExecutor, mHdrSdrRatioChangedListener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** happylint */
|
|
||||||
public void setTargetHdrSdrRatio(float ratio) {
|
|
||||||
if (mRenderHdrSdrRatio != ratio) {
|
|
||||||
mRenderHdrSdrRatio = ratio;
|
|
||||||
mUpdateHdrSdrRatioInfo = true;
|
|
||||||
invalidate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void requestChildFocus(View child, View focused) {
|
public void requestChildFocus(View child, View focused) {
|
||||||
if (DEBUG_INPUT_RESIZE) {
|
if (DEBUG_INPUT_RESIZE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user