Loading services/core/java/com/android/server/wm/AppWindowAnimator.java +2 −1 Original line number Diff line number Diff line Loading @@ -190,7 +190,8 @@ public class AppWindowAnimator { public void clearThumbnail() { if (thumbnail != null) { thumbnail.destroy(); thumbnail.hide(); mService.mWindowPlacerLocked.destroyAfterTransaction(thumbnail); thumbnail = null; } deferThumbnailDestruction = false; Loading services/core/java/com/android/server/wm/WindowAnimator.java +1 −0 Original line number Diff line number Diff line Loading @@ -771,6 +771,7 @@ public class WindowAnimator { } mService.destroyPreservedSurfaceLocked(); mService.mWindowPlacerLocked.destroyPendingSurfaces(); if (DEBUG_WINDOW_TRACE) { Slog.i(TAG, "!!! animate: exit mAnimating=" + mAnimating Loading services/core/java/com/android/server/wm/WindowSurfacePlacer.java +22 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ import android.graphics.Canvas; import android.graphics.PixelFormat; import android.graphics.Rect; import android.os.Debug; import android.os.Message; import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; Loading Loading @@ -125,6 +124,8 @@ class WindowSurfacePlacer { } private final LayerAndToken mTmpLayerAndToken = new LayerAndToken(); private final ArrayList<SurfaceControl> mPendingDestroyingSurfaces = new ArrayList<>(); public WindowSurfacePlacer(WindowManagerService service) { mService = service; mWallpaperControllerLocked = mService.mWallpaperControllerLocked; Loading Loading @@ -542,6 +543,7 @@ class WindowSurfacePlacer { mService.enableScreenIfNeededLocked(); mService.scheduleAnimationLocked(); mService.mWindowPlacerLocked.destroyPendingSurfaces(); if (DEBUG_WINDOW_TRACE) Slog.e(TAG, "performSurfacePlacementInner exit: animating=" + mService.mAnimator.isAnimating()); Loading Loading @@ -1620,6 +1622,25 @@ class WindowSurfacePlacer { } } /** * Puts the {@param surface} into a pending list to be destroyed after the current transaction * has been committed. */ void destroyAfterTransaction(SurfaceControl surface) { mPendingDestroyingSurfaces.add(surface); } /** * Destroys any surfaces that have been put into the pending list with * {@link #destroyAfterTransaction}. */ void destroyPendingSurfaces() { for (int i = mPendingDestroyingSurfaces.size() - 1; i >= 0; i--) { mPendingDestroyingSurfaces.get(i).destroy(); } mPendingDestroyingSurfaces.clear(); } public void dump(PrintWriter pw, String prefix) { pw.print(prefix); pw.print("mTraversalScheduled="); pw.println(mTraversalScheduled); } Loading Loading
services/core/java/com/android/server/wm/AppWindowAnimator.java +2 −1 Original line number Diff line number Diff line Loading @@ -190,7 +190,8 @@ public class AppWindowAnimator { public void clearThumbnail() { if (thumbnail != null) { thumbnail.destroy(); thumbnail.hide(); mService.mWindowPlacerLocked.destroyAfterTransaction(thumbnail); thumbnail = null; } deferThumbnailDestruction = false; Loading
services/core/java/com/android/server/wm/WindowAnimator.java +1 −0 Original line number Diff line number Diff line Loading @@ -771,6 +771,7 @@ public class WindowAnimator { } mService.destroyPreservedSurfaceLocked(); mService.mWindowPlacerLocked.destroyPendingSurfaces(); if (DEBUG_WINDOW_TRACE) { Slog.i(TAG, "!!! animate: exit mAnimating=" + mAnimating Loading
services/core/java/com/android/server/wm/WindowSurfacePlacer.java +22 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ import android.graphics.Canvas; import android.graphics.PixelFormat; import android.graphics.Rect; import android.os.Debug; import android.os.Message; import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; Loading Loading @@ -125,6 +124,8 @@ class WindowSurfacePlacer { } private final LayerAndToken mTmpLayerAndToken = new LayerAndToken(); private final ArrayList<SurfaceControl> mPendingDestroyingSurfaces = new ArrayList<>(); public WindowSurfacePlacer(WindowManagerService service) { mService = service; mWallpaperControllerLocked = mService.mWallpaperControllerLocked; Loading Loading @@ -542,6 +543,7 @@ class WindowSurfacePlacer { mService.enableScreenIfNeededLocked(); mService.scheduleAnimationLocked(); mService.mWindowPlacerLocked.destroyPendingSurfaces(); if (DEBUG_WINDOW_TRACE) Slog.e(TAG, "performSurfacePlacementInner exit: animating=" + mService.mAnimator.isAnimating()); Loading Loading @@ -1620,6 +1622,25 @@ class WindowSurfacePlacer { } } /** * Puts the {@param surface} into a pending list to be destroyed after the current transaction * has been committed. */ void destroyAfterTransaction(SurfaceControl surface) { mPendingDestroyingSurfaces.add(surface); } /** * Destroys any surfaces that have been put into the pending list with * {@link #destroyAfterTransaction}. */ void destroyPendingSurfaces() { for (int i = mPendingDestroyingSurfaces.size() - 1; i >= 0; i--) { mPendingDestroyingSurfaces.get(i).destroy(); } mPendingDestroyingSurfaces.clear(); } public void dump(PrintWriter pw, String prefix) { pw.print(prefix); pw.print("mTraversalScheduled="); pw.println(mTraversalScheduled); } Loading