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

Commit d6b579f6 authored by Lloyd Pique's avatar Lloyd Pique
Browse files

[SurfaceFlinger] Add composition unit tests

Adds some simple tests to verify the hardware and software composition
of a range of layer types, using mocks to verify the right calls are
made to the HWC and RE interfaces

Test: atest libsurfaceflinger_unittest
Bug: 76421986
Bug: 76432611
Change-Id: Ic3f81008c2182048851a8ab32388e54ee815927a
parent 0eb5bf9a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -590,6 +590,9 @@ protected:

    friend class impl::SurfaceInterceptor;

    // For unit tests
    friend class TestableSurfaceFlinger;

    void commitTransaction(const State& stateToCommit);

    uint32_t getEffectiveUsage(uint32_t usage) const;
+3 −0
Original line number Diff line number Diff line
@@ -87,6 +87,9 @@ public:
    friend class ColorLayer;
    friend class SurfaceFlinger;

    // For unit tests
    friend class TestableSurfaceFlinger;

    LayerBE(Layer* layer, std::string layerName);
    explicit LayerBE(const LayerBE& layer);

+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ cc_test {
    test_suites: ["device-tests"],
    srcs: [
        ":libsurfaceflinger_sources",
        "CompositionTest.cpp",
        "DisplayIdentificationTest.cpp",
        "DisplayTransactionTest.cpp",
        "EventControlThreadTest.cpp",
Loading