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

Commit 00679b8a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Treat dimming-disabled layers as HDR" into tm-dev

parents 8ea20667 2c0ea355
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2347,7 +2347,12 @@ void SurfaceFlinger::setCompositorTimingSnapped(const DisplayStatInfo& stats,
}

bool SurfaceFlinger::isHdrLayer(Layer* layer) const {
    if (!isHdrDataspace(layer->getDataSpace())) {
    // Treat all layers as non-HDR if:
    // 1. They do not have a valid HDR dataspace. Currently we treat those as PQ or HLG. and
    // 2. The layer is allowed to be dimmed. WindowManager may disable dimming in order to
    // keep animations invoking SDR screenshots of HDR layers seamless. Treat such tagged
    // layers as HDR so that DisplayManagerService does not try to change the screen brightness
    if (!isHdrDataspace(layer->getDataSpace()) && layer->isDimmingEnabled()) {
        return false;
    }
    if (mIgnoreHdrCameraLayers) {