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

Commit f8e8c5c0 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Automerger Merge Worker
Browse files

Merge "Flush mPostDrawTransaction when WSA is torn down" into sc-dev am: 328ba5dc

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

Change-Id: Iebf60829800c0c7afd1f1b6afd09c7c97e3cf969
parents 59afbf35 328ba5dc
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -16,12 +16,6 @@

package com.android.server.wm;

import static android.graphics.Matrix.MSCALE_X;
import static android.graphics.Matrix.MSCALE_Y;
import static android.graphics.Matrix.MSKEW_X;
import static android.graphics.Matrix.MSKEW_Y;
import static android.graphics.Matrix.MTRANS_X;
import static android.graphics.Matrix.MTRANS_Y;
import static android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
@@ -54,14 +48,12 @@ import static com.android.server.wm.WindowStateAnimatorProto.SURFACE;
import static com.android.server.wm.WindowStateAnimatorProto.SYSTEM_DECOR_RECT;

import android.content.Context;
import android.graphics.Matrix;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.os.Debug;
import android.os.Trace;
import android.util.Slog;
import android.util.proto.ProtoOutputStream;
import android.view.DisplayInfo;
import android.view.Surface.OutOfResourcesException;
import android.view.SurfaceControl;
import android.view.WindowManager;
@@ -260,7 +252,10 @@ class WindowStateAnimator {
        }

        if (postDrawTransaction != null) {
            if (mLastHidden) {
            // If there is no surface, the last draw was for the previous surface. We don't want to
            // wait until the new surface is shown and instead just apply the transaction right
            // away.
            if (mLastHidden && mDrawState != NO_SURFACE) {
                mPostDrawTransaction.merge(postDrawTransaction);
                layoutNeeded = true;
            } else {
@@ -830,6 +825,10 @@ class WindowStateAnimator {
    }

    void destroySurface(SurfaceControl.Transaction t) {
        // Since the SurfaceControl is getting torn down, it's safe to just clean up any
        // pending transactions that were in mPostDrawTransaction, as well.
        t.merge(mPostDrawTransaction);

        try {
            if (mSurfaceController != null) {
                mSurfaceController.destroy(t);