Fix ScreenRotation flicker from 90 to 270.

When porting over ScreenRotation to use BufferStateLayer, rotating from
90 to 270 broke. This is because the old code was trying to screenshot
and rotate based off 0 rotation instead of off the current rotation.

Cleaned up the code so it now takes the screenshot in the current
orientation and creates a rotation matrix based on the current
rotation

Test: Screen rotation
Fixes: 186352065
Change-Id: I0d1268a849959fbb3d2b3158e099b595d00f273b
1 file changed