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

Commit b73cb52f authored by Alec Mouri's avatar Alec Mouri Committed by Automerger Merge Worker
Browse files

Propagate the 170M->sRGB lie everywhere. am: 7dae9c10 am: 50c4d046 am: 9b639a5d

parents 5929f9d5 9b639a5d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ void OutputCompositionState::dump(std::string& out) const {
    out.append("\n   ");

    out.append("\n   ");
    dumpVal(out, "treate170mAsSrgb", treat170mAsSrgb);
    dumpVal(out, "treat170mAsSrgb", treat170mAsSrgb);

    out.append("\n");
    for (const auto& borderRenderInfo : borderInfoList) {
+13 −12
Original line number Diff line number Diff line
@@ -180,8 +180,8 @@ void CachedSet::render(renderengine::RenderEngine& renderEngine, TexturePool& te
            .targetLuminanceNits = outputState.displayBrightnessNits,
    };

    LayerFE::ClientCompositionTargetSettings targetSettings{
            .clip = Region(viewport),
    LayerFE::ClientCompositionTargetSettings
            targetSettings{.clip = Region(viewport),
                           .needsFiltering = false,
                           .isSecure = outputState.isSecure,
                           .supportsProtectedContent = false,
@@ -189,9 +189,10 @@ void CachedSet::render(renderengine::RenderEngine& renderEngine, TexturePool& te
                           .dataspace = outputDataspace,
                           .realContentIsVisible = true,
                           .clearContent = false,
            .blurSetting = LayerFE::ClientCompositionTargetSettings::BlurSetting::Enabled,
                           .blurSetting =
                                   LayerFE::ClientCompositionTargetSettings::BlurSetting::Enabled,
                           .whitePointNits = outputState.displayBrightnessNits,
    };
                           .treat170mAsSrgb = outputState.treat170mAsSrgb};

    std::vector<renderengine::LayerSettings> layerSettings;
    renderengine::LayerSettings highlight;
+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ std::shared_ptr<ScreenCaptureOutput> createScreenCaptureOutput(ScreenCaptureOutp
    output->setRenderSurface(std::make_unique<ScreenCaptureRenderSurface>(std::move(args.buffer)));
    output->setDisplayBrightness(args.sdrWhitePointNits, args.displayBrightnessNits);
    output->editState().clientTargetBrightness = args.targetBrightness;
    output->editState().treat170mAsSrgb = args.treat170mAsSrgb;

    output->setDisplayColorProfile(std::make_unique<compositionengine::impl::DisplayColorProfile>(
            compositionengine::DisplayColorProfileCreationArgsBuilder()
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ struct ScreenCaptureOutputArgs {
    // Counterintuitively, when targetBrightness > 1.0 then dim the scene.
    float targetBrightness;
    bool regionSampling;
    bool treat170mAsSrgb;
};

// ScreenCaptureOutput is used to compose a set of layers into a preallocated buffer.
+2 −1
Original line number Diff line number Diff line
@@ -7686,7 +7686,8 @@ ftl::SharedFuture<FenceResult> SurfaceFlinger::renderScreenImpl(
                                        .sdrWhitePointNits = sdrWhitePointNits,
                                        .displayBrightnessNits = displayBrightnessNits,
                                        .targetBrightness = targetBrightness,
                                        .regionSampling = regionSampling});
                                        .regionSampling = regionSampling,
                                        .treat170mAsSrgb = mTreat170mAsSrgb});

        const float colorSaturation = grayscale ? 0 : 1;
        compositionengine::CompositionRefreshArgs refreshArgs{