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

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

Merge "CE: Update layer composition state outside of CE"

parents 3e6583fc ba354103
Loading
Loading
Loading
Loading
+2 −25
Original line number Diff line number Diff line
@@ -53,31 +53,8 @@ public:
    // Called before composition starts. Should return true if this layer has
    // pending updates which would require an extra display refresh cycle to
    // process.
    virtual bool onPreComposition(nsecs_t refreshStartTime) = 0;

    // Used with latchCompositionState()
    enum class StateSubset {
        // Gets the basic geometry (bounds, transparent region, visibility,
        // transforms, alpha) for the layer, for computing visibility and
        // coverage.
        BasicGeometry,

        // Gets the full geometry (crops, buffer transforms, metadata) and
        // content (buffer or color) state for the layer.
        GeometryAndContent,

        // Gets the per frame content (buffer or color) state for the layer.
        Content,

        // Gets the cursor state for the layer.
        Cursor,
    };

    // Prepares the output-independent composition state for the layer. The
    // StateSubset argument selects what portion of the state is actually needed
    // by the CompositionEngine code, since computing everything may be
    // expensive.
    virtual void prepareCompositionState(StateSubset) = 0;
    virtual bool onPreComposition(nsecs_t refreshStartTime,
                                  bool updatingOutputGeometryThisFrame) = 0;

    struct ClientCompositionTargetSettings {
        enum class BlurSetting {
+0 −3
Original line number Diff line number Diff line
@@ -262,9 +262,6 @@ public:
    // Presents the output, finalizing all composition details
    virtual void present(const CompositionRefreshArgs&) = 0;

    // Latches the front-end layer state for each output layer
    virtual void updateLayerStateFromFE(const CompositionRefreshArgs&) const = 0;

    // Enables predicting composition strategy to run client composition earlier
    virtual void setPredictCompositionStrategy(bool) = 0;

+0 −2
Original line number Diff line number Diff line
@@ -51,8 +51,6 @@ public:
    // Debugging
    void dump(std::string&) const override;

    void updateLayerStateFromFE(CompositionRefreshArgs& args);

    // Testing
    void setNeedsAnotherUpdateForTest(bool);

+0 −1
Original line number Diff line number Diff line
@@ -89,7 +89,6 @@ public:
                                    compositionengine::Output::CoverageState&) override;
    void setReleasedLayers(const compositionengine::CompositionRefreshArgs&) override;

    void updateLayerStateFromFE(const CompositionRefreshArgs&) const override;
    void updateCompositionState(const compositionengine::CompositionRefreshArgs&) override;
    void planComposition() override;
    void writeCompositionState(const compositionengine::CompositionRefreshArgs&) override;
+1 −2
Original line number Diff line number Diff line
@@ -42,9 +42,8 @@ public:

    MOCK_CONST_METHOD0(getCompositionState, const LayerFECompositionState*());

    MOCK_METHOD1(onPreComposition, bool(nsecs_t));
    MOCK_METHOD2(onPreComposition, bool(nsecs_t, bool));

    MOCK_METHOD1(prepareCompositionState, void(compositionengine::LayerFE::StateSubset));
    MOCK_CONST_METHOD1(prepareClientComposition,
                       std::optional<compositionengine::LayerFE::LayerSettings>(
                               compositionengine::LayerFE::ClientCompositionTargetSettings&));
Loading