Fixed incorrect size and position of a snapshot starting window in
waterfall device.
The dst frame was calculated from scaling the cropped snapshot which
copped out the system decorations(letterboxes, nav bar and sometimes
status bar). But the src frame was set to the original uncropped
snapshot which caused this issue.
Now set the src frame to the cropped snapshot and we could just offset
the dst frame to (0, 0) since we use a matrix to tranlate from a cropped
frame to a scaled cropped frame.
Bug: 151740296
Test: atest TaskSnapshotSurfaceTest
Test: Enable waterfall overlay, launch an app and lock then unlock device
Change-Id: I0ddc8aa480264d2e6d0e59bf4dc9bd09aa3e3041
2 files changed