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

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

Merge "CE: Introduce CompositionEngine::dump()"

parents d36718d3 c3cb7291
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -66,6 +66,9 @@ public:

    // TODO(b/121291683): These will become private/internal
    virtual void preComposition(CompositionRefreshArgs&) = 0;

    // Debugging
    virtual void dump(std::string&) const = 0;
};

} // namespace compositionengine
+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@ public:

    void preComposition(CompositionRefreshArgs&) override;

    // Debugging
    void dump(std::string&) const override;

    void updateLayerStateFromFE(CompositionRefreshArgs& args);

    // Testing
+2 −0
Original line number Diff line number Diff line
@@ -48,6 +48,8 @@ public:
    MOCK_METHOD1(updateCursorAsync, void(CompositionRefreshArgs&));

    MOCK_METHOD1(preComposition, void(CompositionRefreshArgs&));

    MOCK_CONST_METHOD1(dump, void(std::string&));
};

} // namespace android::compositionengine::mock
+4 −0
Original line number Diff line number Diff line
@@ -130,6 +130,10 @@ void CompositionEngine::preComposition(CompositionRefreshArgs& args) {
    mNeedsAnotherUpdate = needsAnotherUpdate;
}

void CompositionEngine::dump(std::string&) const {
    // The base class has no state to dump, but derived classes might.
}

void CompositionEngine::setNeedsAnotherUpdateForTest(bool value) {
    mNeedsAnotherUpdate = value;
}
+6 −0
Original line number Diff line number Diff line
@@ -4225,6 +4225,12 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, std::string& result) co
    }
    result.append("\n");

    /*
     * Dump CompositionEngine state
     */

    mCompositionEngine->dump(result);

    /*
     * Dump SurfaceFlinger global state
     */