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

Commit a84fd9e7 authored by Rob Carr's avatar Rob Carr Committed by Automerger Merge Worker
Browse files

Merge "SurfaceFlinger: Correct logic error in early release" into tm-dev am:...

Merge "SurfaceFlinger: Correct logic error in early release" into tm-dev am: 7a85fb13 am: 238d1d4b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/18611107



Change-Id: If7de3d270c85b262eb55fe5e032b01ace008b163
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c9687d4f 238d1d4b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -358,8 +358,6 @@ void BufferLayer::onPostComposition(const DisplayDevice* display,
    // composition.
    if (!mBufferInfo.mFrameLatencyNeeded) return;

    mAlreadyDisplayedThisCompose = false;

    // Update mFrameEventHistory.
    finalizeFrameEventHistory(glDoneFence, compositorTiming);

+2 −2
Original line number Diff line number Diff line
@@ -79,10 +79,10 @@ void BufferStateLayer::onLayerDisplayed(ftl::SharedFuture<FenceResult> futureFen
    //  For example we can only use it if all the displays are client comp, and we need
    //  to merge all the client comp fences. We could do this, but for now we just
    // disable the optimization when a layer is composed on multiple displays.
    if (mAlreadyDisplayedThisCompose) {
    if (mClearClientCompositionFenceOnLayerDisplayed) {
        mLastClientCompositionFence = nullptr;
    } else {
        mAlreadyDisplayedThisCompose = true;
        mClearClientCompositionFenceOnLayerDisplayed = true;
    }

    // The previous release fence notifies the client that SurfaceFlinger is done with the previous
+1 −0
Original line number Diff line number Diff line
@@ -1300,6 +1300,7 @@ std::vector<LayerFE::LayerSettings> Output::generateClientCompositionRequests(
        const auto& layerState = layer->getState();
        const auto* layerFEState = layer->getLayerFE().getCompositionState();
        auto& layerFE = layer->getLayerFE();
        layerFE.setWasClientComposed(nullptr);

        const Region clip(viewportRegion.intersect(layerState.visibleRegion));
        ALOGV("Layer: %s", layerFE.getDebugName());
+2 −1
Original line number Diff line number Diff line
@@ -620,6 +620,7 @@ public:

    void setWasClientComposed(const sp<Fence>& fence) override {
        mLastClientCompositionFence = fence;
        mClearClientCompositionFenceOnLayerDisplayed = false;
    }

    const char* getDebugName() const override;
@@ -1035,7 +1036,7 @@ protected:
    mutable bool mDrawingStateModified = false;

    sp<Fence> mLastClientCompositionFence;
    bool mAlreadyDisplayedThisCompose = false;
    bool mClearClientCompositionFenceOnLayerDisplayed = false;
private:
    virtual void setTransformHint(ui::Transform::RotationFlags) {}