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
This commit is contained in:
Winson Chung
2020-06-01 16:31:26 -07:00
parent 4bacb14212
commit 890e6f20af

View File

@@ -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