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

Commit a692e0fd authored by Leon Scroggins's avatar Leon Scroggins Committed by Android (Google) Code Review
Browse files

Merge "More thorough check for expensive rendering" into tm-dev

parents 9dec9306 cf17ebca
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1203,8 +1203,12 @@ std::optional<base::unique_fd> Output::composeSurfaces(
    // because high frequency consumes extra battery.
    const bool expensiveBlurs =
            refreshArgs.blursAreExpensive && mLayerRequestingBackgroundBlur != nullptr;
    const bool expensiveRenderingExpected =
            clientCompositionDisplay.outputDataspace == ui::Dataspace::DISPLAY_P3 || expensiveBlurs;
    const bool expensiveRenderingExpected = expensiveBlurs ||
            std::any_of(clientCompositionLayers.begin(), clientCompositionLayers.end(),
                        [outputDataspace =
                                 clientCompositionDisplay.outputDataspace](const auto& layer) {
                            return layer.sourceDataspace != outputDataspace;
                        });
    if (expensiveRenderingExpected) {
        setExpensiveRenderingExpected(true);
    }