[MediaProjection] transform mirrored layers when the surface resizes

Aside from resizing the VirtualDisplay from MediaProjection#createVirtualDisplay,
an app may also set a new output surface on the VirtualDisplay. This output
surface is where the mirrored layers are rendered out to, so we must transform
the mirrored layers in response to any Surface size changes.

Bug: 300481174
Test: atest WmTests:ContentRecorderTests
Change-Id: I062379b9d702fb2c3a13e5442ee14036d1a31637
3 files changed