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

Commit 0ebdbe31 authored by Su Hong Koo's avatar Su Hong Koo
Browse files

SF: setLayerCachingTexturePoolEnabled() for the pacesetter display

Currently, SurfaceFlinger enables layer caching texture pool for the
front internal display.

With this CL, the texture pool is enabled on the pacesetter display
instead. If the pacesetter designation changes from one display to
another, the old pacesetter’s pool is disabled before the new
pacesetter’s pool is enabled.

Flag: com.android.graphics.surfaceflinger.flags.pacesetter_selection
Bug: 255635821
Test: dumpsys SurfaceFlinger --planner && new setPhysicalDisplayPowerModeTest
Change-Id: Ibaf24294bc908affb7d6056040452af3118763c0
parent 15c951b6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -283,6 +283,9 @@ public:
    // Enables overriding the 170M trasnfer function as sRGB
    virtual void setTreat170mAsSrgb(bool) = 0;

    // For test use only. Returns whether the planner has the layer caching texture pool enabled.
    virtual bool plannerTexturePoolEnabled() const = 0;

protected:
    virtual void setDisplayColorProfile(std::unique_ptr<DisplayColorProfile>) = 0;
    virtual void setRenderSurface(std::unique_ptr<RenderSurface>) = 0;
+2 −0
Original line number Diff line number Diff line
@@ -118,7 +118,9 @@ public:
    const ReleasedLayers& getReleasedLayersForTest() const;
    void setDisplayColorProfileForTest(std::unique_ptr<compositionengine::DisplayColorProfile>);
    void setRenderSurfaceForTest(std::unique_ptr<compositionengine::RenderSurface>);

    bool plannerEnabled() const { return mPlanner != nullptr; }
    bool plannerTexturePoolEnabled() const override;
    virtual bool anyLayersRequireClientComposition() const;
    virtual void updateProtectedContentState();
    virtual bool dequeueRenderBuffer(base::unique_fd*,
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ public:
                          bool deviceHandlesColorTransform);

    void setTexturePoolEnabled(bool enabled) { mTexturePool.setEnabled(enabled); }
    bool isTexturePoolEnabled() const { return mTexturePool.isEnabled(); }

    void dump(std::string& result) const;
    void dumpLayers(std::string& result) const;
+2 −0
Original line number Diff line number Diff line
@@ -70,6 +70,8 @@ public:

    void setTexturePoolEnabled(bool enabled) { mFlattener.setTexturePoolEnabled(enabled); }

    bool isTexturePoolEnabled() const { return mFlattener.isTexturePoolEnabled(); }

    void dump(const Vector<String16>& args, std::string&);

private:
+2 −0
Original line number Diff line number Diff line
@@ -85,6 +85,8 @@ public:

    void dump(std::string& out) const;

    bool isEnabled() const { return mEnabled; }

protected:
    // Proteted visibility so that they can be used for testing
    const static constexpr size_t kMinPoolSize = 3;
Loading