summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sally Qi <sallyqi@google.com> 2023-08-21 16:23:29 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-08-21 16:23:29 +0000
commit8da3c4bbcabeebb52f11687340bffd1cf28c3db0 (patch)
treed4d5950f9fcebf3e14772ffc8ee2363bdfa49725
parent3e7eb31b766ddc40bea9ce9b3d839187bceb9290 (diff)
parent8f9ed6518ee741875eb2c2eb60a0168687d236eb (diff)
Merge "Fix getHdrRenderType function in OutputLayer.cpp" into main
-rw-r--r--services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
index 4fe6927d80..22db247cc9 100644
--- a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
@@ -327,10 +327,6 @@ void OutputLayer::updateCompositionState(
? outputState.dataspace
: layerFEState->dataspace;
- // re-get HdrRenderType after the dataspace gets changed.
- hdrRenderType =
- getHdrRenderType(state.dataspace, pixelFormat, layerFEState->desiredHdrSdrRatio);
-
// Override the dataspace transfer from 170M to sRGB if the device configuration requests this.
// We do this here instead of in buffer info so that dumpsys can still report layers that are
// using the 170M transfer. Also we only do this if the colorspace is not agnostic for the
@@ -342,6 +338,10 @@ void OutputLayer::updateCompositionState(
(state.dataspace & HAL_DATASPACE_RANGE_MASK) | HAL_DATASPACE_TRANSFER_SRGB);
}
+ // re-get HdrRenderType after the dataspace gets changed.
+ hdrRenderType =
+ getHdrRenderType(state.dataspace, pixelFormat, layerFEState->desiredHdrSdrRatio);
+
// For hdr content, treat the white point as the display brightness - HDR content should not be
// boosted or dimmed.
// If the layer explicitly requests to disable dimming, then don't dim either.