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

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

Merge "SF: Move doComposeSurfaces to CompositionEngine"

parents b8b45eba 688abd45
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ std::optional<renderengine::LayerSettings> BufferLayer::prepareClientComposition
        }
        return std::nullopt;
    }
    bool blackOutLayer = (isProtected() && !targetSettings.supportProtectedContent) ||
    bool blackOutLayer = (isProtected() && !targetSettings.supportsProtectedContent) ||
            (isSecure() && !targetSettings.isSecure);
    const State& s(getDrawingState());
    auto& layer = *result;
+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ cc_test {
        "tests/LayerTest.cpp",
        "tests/MockHWC2.cpp",
        "tests/MockHWComposer.cpp",
        "tests/MockPowerAdvisor.cpp",
        "tests/OutputTest.cpp",
        "tests/OutputLayerTest.cpp",
        "tests/RenderSurfaceTest.cpp",
+9 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <optional>

#include "DisplayHardware/DisplayIdentification.h"
#include "DisplayHardware/PowerAdvisor.h"

namespace android::compositionengine {

@@ -37,6 +38,10 @@ struct DisplayCreationArgs {

    // Identifies the display to the HWC, if composition is supported by it
    std::optional<DisplayId> displayId;

    // Optional pointer to the power advisor interface, if one is needed for
    // this display.
    Hwc2::PowerAdvisor* powerAdvisor = nullptr;
};

/**
@@ -68,6 +73,10 @@ public:
        mArgs.displayId = displayId;
        return *this;
    }
    DisplayCreationArgsBuilder& setPowerAdvisor(Hwc2::PowerAdvisor* powerAdvisor) {
        mArgs.powerAdvisor = powerAdvisor;
        return *this;
    }

private:
    DisplayCreationArgs mArgs;
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ public:
        const bool isSecure;

        // If set to true, the target buffer has protected content support.
        const bool supportProtectedContent;
        const bool supportsProtectedContent;

        // Modified by each call to prepareClientComposition to indicate the
        // region of the target buffer that should be cleared.
+6 −0
Original line number Diff line number Diff line
@@ -116,6 +116,12 @@ struct LayerFECompositionState {
    // The color transform
    mat4 colorTransform;
    bool colorTransformIsIdentity{true};

    // True if the layer is completely opaque
    bool isOpaque{true};

    // True if the layer has protected content
    bool hasProtectedContent{false};
};

} // namespace android::compositionengine
Loading