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

Commit c2c32407 authored by Zhao Wei Liew's avatar Zhao Wei Liew
Browse files

surfaceflinger: hwc1: Add missing mActiveFrameSequence counter

In commit 66a7233a,
the mActiveFrameSequence counter was not ported to
HWC1, causing the blur layer to not capture any
screenshot after the initial one.

The end result is a static blur image that never changes.

Add the missing counter so that blur screenshots
get re-captured when needed.

Change-Id: I97294d11821297217853bb7ff2d11de475d98325
parent 3a14886a
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -171,7 +171,8 @@ SurfaceFlinger::SurfaceFlinger()
        mHasPoweredOff(false),
        mHasPoweredOff(false),
        mFrameBuckets(),
        mFrameBuckets(),
        mTotalTime(0),
        mTotalTime(0),
        mLastSwapTime(0)
        mLastSwapTime(0),
        mActiveFrameSequence(0)
{
{
    ALOGI("SurfaceFlinger is starting");
    ALOGI("SurfaceFlinger is starting");


@@ -1337,6 +1338,8 @@ void SurfaceFlinger::doComposition() {
            // repaint the framebuffer (if needed)
            // repaint the framebuffer (if needed)
            doDisplayComposition(hw, dirtyRegion);
            doDisplayComposition(hw, dirtyRegion);


            ++mActiveFrameSequence;

            hw->dirtyRegion.clear();
            hw->dirtyRegion.clear();
            hw->flip(hw->swapRegion);
            hw->flip(hw->swapRegion);
            hw->swapRegion.clear();
            hw->swapRegion.clear();
@@ -3665,6 +3668,8 @@ status_t SurfaceFlinger::captureScreenImplLocked(
        return BAD_VALUE;
        return BAD_VALUE;
    }
    }


    ++mActiveFrameSequence;

    reqWidth  = (!reqWidth)  ? hw_w : reqWidth;
    reqWidth  = (!reqWidth)  ? hw_w : reqWidth;
    reqHeight = (!reqHeight) ? hw_h : reqHeight;
    reqHeight = (!reqHeight) ? hw_h : reqHeight;