From b42dcc8f4b314223ce2017a74fb8336dd18b8ee7 Mon Sep 17 00:00:00 2001 From: wilsonshih Date: Fri, 14 Feb 2025 02:59:05 +0000 Subject: Reduce memory usage for drawing app theme snapshot. Since the content of the app theme snapshot is mostly a monochrome image, drawing it in a smaller size should be a reasonable solution to prevent memory waste. Flag: com.android.window.flags.reduce_task_snapshot_memory_usage Bug: 238206323 Test: verify the memory usage of app theme snapshot become much smaller, and there is no obvious difference on recents animation. Change-Id: Ibc74938adbf323e4bf703135db17aaf8f7433f72 --- .../android/server/wm/AbsAppSnapshotController.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/services/core/java/com/android/server/wm/AbsAppSnapshotController.java b/services/core/java/com/android/server/wm/AbsAppSnapshotController.java index a731bf7c64b3..70fc6bace868 100644 --- a/services/core/java/com/android/server/wm/AbsAppSnapshotController.java +++ b/services/core/java/com/android/server/wm/AbsAppSnapshotController.java @@ -82,6 +82,7 @@ abstract class AbsAppSnapshotController