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

Commit 8da3c4bb authored by Sally Qi's avatar Sally Qi Committed by Android (Google) Code Review
Browse files

Merge "Fix getHdrRenderType function in OutputLayer.cpp" into main

parents 3e7eb31b 8f9ed651
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -327,10 +327,6 @@ void OutputLayer::updateCompositionState(
            ? outputState.dataspace
            ? outputState.dataspace
            : layerFEState->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.
    // 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
    // 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
    // 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);
                (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
    // For hdr content, treat the white point as the display brightness - HDR content should not be
    // boosted or dimmed.
    // boosted or dimmed.
    // If the layer explicitly requests to disable dimming, then don't dim either.
    // If the layer explicitly requests to disable dimming, then don't dim either.