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

Commit 81c1f635 authored by Chris Craik's avatar Chris Craik Committed by android-build-merger
Browse files

Merge "Reset transparent region when saving a surface" into nyc-dev am: 52b952a2 am: f6f6c472

am: 8e6609fc

* commit '8e6609fc':
  Reset transparent region when saving a surface

Change-Id: Idc0d60b09ee5420b77e9c0511aa1f0347a4bbdca
parents e9d6c270 8e6609fc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1995,12 +1995,17 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        return mAppToken.shouldSaveSurface();
    }

    static final Region sEmptyRegion = new Region();

    void destroyOrSaveSurface() {
        mSurfaceSaved = shouldSaveSurface();
        if (mSurfaceSaved) {
            if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) {
                Slog.v(TAG, "Saving surface: " + this);
            }
            // Previous user of the surface may have set a transparent region signaling a portion
            // doesn't need to be composited, so reset to default empty state.
            mSession.setTransparentRegion(mClient, sEmptyRegion);

            mWinAnimator.hide("saved surface");
            mWinAnimator.mDrawState = WindowStateAnimator.NO_SURFACE;