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

Commit 81876de1 authored by Chia-I Wu's avatar Chia-I Wu Committed by android-build-merger
Browse files

surfaceflinger: refresh after latching any buffer

am: a36bf926

Change-Id: If437e00a4c8aeda42f26150066a4fd7baaad485e
parents 0e2e4435 a36bf926
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -408,6 +408,7 @@ public:
     * to figure out if the content or size of a surface has changed.
     * to figure out if the content or size of a surface has changed.
     */
     */
    Region latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime);
    Region latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime);
    bool isBufferLatched() const { return mRefreshPending; }


    bool isPotentialCursor() const { return mPotentialCursor;}
    bool isPotentialCursor() const { return mPotentialCursor;}


+2 −2
Original line number Original line Diff line number Diff line
@@ -2457,7 +2457,7 @@ bool SurfaceFlinger::handlePageFlip()
        const Region dirty(layer->latchBuffer(visibleRegions, latchTime));
        const Region dirty(layer->latchBuffer(visibleRegions, latchTime));
        layer->useSurfaceDamage();
        layer->useSurfaceDamage();
        invalidateLayerStack(layer->getLayerStack(), dirty);
        invalidateLayerStack(layer->getLayerStack(), dirty);
        if (!dirty.isEmpty()) {
        if (layer->isBufferLatched()) {
            newDataLatched = true;
            newDataLatched = true;
        }
        }
    }
    }
@@ -2467,7 +2467,7 @@ bool SurfaceFlinger::handlePageFlip()
    // If we will need to wake up at some time in the future to deal with a
    // If we will need to wake up at some time in the future to deal with a
    // queued frame that shouldn't be displayed during this vsync period, wake
    // queued frame that shouldn't be displayed during this vsync period, wake
    // up during the next vsync period to check again.
    // up during the next vsync period to check again.
    if (frameQueued && mLayersWithQueuedFrames.empty()) {
    if (frameQueued && (mLayersWithQueuedFrames.empty() || !newDataLatched)) {
        signalLayerUpdate();
        signalLayerUpdate();
    }
    }