diff options
author | 2024-08-28 02:50:39 +0000 | |
---|---|---|
committer | 2024-08-28 02:50:39 +0000 | |
commit | 1798b05a481ab6f668c87c1c12fa898d39de7f2f (patch) | |
tree | 8f9ab6fb1973b7f7a019ee1cf04baed591f5cb37 | |
parent | f28b8703e433fdad24a322335182aee5cfd10083 (diff) | |
parent | 7af807ed02a1cdeca0fe7429c3596263172078b2 (diff) |
Merge "Use shared surface session for snapshot surface" into main
-rw-r--r-- | core/java/android/window/SnapshotDrawerUtils.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/java/android/window/SnapshotDrawerUtils.java b/core/java/android/window/SnapshotDrawerUtils.java index 205f1defccd1..2f595d107a6c 100644 --- a/core/java/android/window/SnapshotDrawerUtils.java +++ b/core/java/android/window/SnapshotDrawerUtils.java @@ -59,7 +59,6 @@ import android.os.IBinder; import android.util.Log; import android.view.InsetsState; import android.view.SurfaceControl; -import android.view.SurfaceSession; import android.view.ViewGroup; import android.view.WindowInsets; import android.view.WindowManager; @@ -185,7 +184,6 @@ public class SnapshotDrawerUtils { private void drawSizeMismatchSnapshot() { final HardwareBuffer buffer = mSnapshot.getHardwareBuffer(); - final SurfaceSession session = new SurfaceSession(); // We consider nearly matched dimensions as there can be rounding errors and the user // won't notice very minute differences from scaling one dimension more than the other @@ -193,7 +191,7 @@ public class SnapshotDrawerUtils { && !Flags.drawSnapshotAspectRatioMatch(); // Keep a reference to it such that it doesn't get destroyed when finalized. - SurfaceControl childSurfaceControl = new SurfaceControl.Builder(session) + SurfaceControl childSurfaceControl = new SurfaceControl.Builder() .setName(mTitle + " - task-snapshot-surface") .setBLASTLayer() .setFormat(buffer.getFormat()) |