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

Commit fe2975ef authored by JihCheng Chiu's avatar JihCheng Chiu Committed by Robert Chou
Browse files

DO NOT MERGE Change the logic of ContainerLayer's isVisible()

The original logic of ContainerLayer's isVisible() checks the hidden flag.
Therefore, SurfaceFlinger thought that those abstract surfaces have to
show in display. However, they are meaningless for frame content. They
should be ignored by SurfaceFlinger, so we can safely return false.

Test: Change the type of abstract surface to ContainerLayer. Then slide
      UI, play video and so on.
Bug: 111164627
Change-Id: I09e8647dc7fd8578d28dd79f3428a5e2eeb822fe
parent d6f7035d
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -30,10 +30,6 @@ ContainerLayer::ContainerLayer(SurfaceFlinger* flinger, const sp<Client>& client

void ContainerLayer::onDraw(const RenderArea&, const Region& /* clip */, bool) const {}

bool ContainerLayer::isVisible() const {
    return !isHiddenByPolicy();
}

void ContainerLayer::setPerFrameData(const sp<const DisplayDevice>&) {}

} // namespace android
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ public:
    const char* getTypeId() const override { return "ContainerLayer"; }
    void onDraw(const RenderArea& renderArea, const Region& clip,
                bool useIdentityTransform) const override;
    bool isVisible() const override;
    bool isVisible() const override { return false; }

    void setPerFrameData(const sp<const DisplayDevice>& displayDevice) override;