Make child window inherit the scale of parent

The child window computes its layout in parent's frame.
If parent frame is scaled, the position and size of
child window is already based on parent. And the child
surface also has the same scale from parent surface.

This change makes mGlobalScale of child window to 1.
And use the unscaled containing frame display frame of
parent to apply gravity, so the child window can fit
in the scaled content of parent window.

Bug: 182362657
Test: atest WindowStateTests#testCompatOverrideScale

Change-Id: Ie8b9fabcfbccb63f54d51bdd55b23f835151202d
3 files changed