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

Commit c41fcc38 authored by Jeykumar Sankaran's avatar Jeykumar Sankaran Committed by Steve Kondik
Browse files

SurfaceFlinger: Invalidate HWC Geometry on buffer validity change

HWC layer's flags and properties need to be updated whenever the
properties of the layer change. This change adds support to update
the flag when layer's buffer validity changes.

CRs-Fixed: 334664

Change-Id: Ia785f58c8d89ebd18867c78d93f1733c82694435
(cherry picked from commit 242fc135f91e6967d0a37f6de78e6090643fa35d)
parent 227ed7f0
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -505,6 +505,13 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
        // update the active buffer
        // update the active buffer
        mActiveBuffer = mSurfaceTexture->getCurrentBuffer();
        mActiveBuffer = mSurfaceTexture->getCurrentBuffer();


#ifdef QCOM_HARDWARE
        //Buffer validity changed. Reset HWC geometry flags.
        if(oldActiveBuffer == NULL && mActiveBuffer != NULL) {
            mFlinger->invalidateHwcGeometry();
        }
#endif

        const Rect crop(mSurfaceTexture->getCurrentCrop());
        const Rect crop(mSurfaceTexture->getCurrentCrop());
        const uint32_t transform(mSurfaceTexture->getCurrentTransform());
        const uint32_t transform(mSurfaceTexture->getCurrentTransform());
        const uint32_t scalingMode(mSurfaceTexture->getCurrentScalingMode());
        const uint32_t scalingMode(mSurfaceTexture->getCurrentScalingMode());