From 890e6f20afd1389f120dd1e293c8c57d91976e0f Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Mon, 1 Jun 2020 16:31:26 -0700 Subject: [PATCH] Make snapshot surface relative to parent - When in splitscreen and the snapshot aspect ratio matches the parent we need to offset to ensure that the calculated matrix is relative to the parent otherwise Change-Id: I2fcd72bde40171fb456108993214b00741abe7fd Bug: 157624680 Test: Enable waterfall/tall cutouts, quickswitch in both full and splitscreen Test: atest TaskSnapshotSurfaceTest --- .../core/java/com/android/server/wm/TaskSnapshotSurface.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/wm/TaskSnapshotSurface.java b/services/core/java/com/android/server/wm/TaskSnapshotSurface.java index 392557045b4a4..e26f1e1fe06fb 100644 --- a/services/core/java/com/android/server/wm/TaskSnapshotSurface.java +++ b/services/core/java/com/android/server/wm/TaskSnapshotSurface.java @@ -391,6 +391,7 @@ class TaskSnapshotSurface implements StartingSurface { frame = null; mTmpSnapshotSize.set(0, 0, buffer.getWidth(), buffer.getHeight()); mTmpDstFrame.set(mFrame); + mTmpDstFrame.offsetTo(0, 0); } // Scale the mismatch dimensions to fill the task bounds