Ensure insets for input are transformed correctly.

This change does the following:

1. Takes the inverse transform and transforms the final layer bounds.
This is to find the real bounds, including insets after insets have been
added.

2. Use the top and left of the real bounds to get the translation value
for the transform. This is done by applying the original transform on
the new left and top.

3. Set the translation of the input transform as the calculated values
from above.

4. Send the inverse transform to input so the input coordinates can be
transformed to window space.

Also use the transform to correctly update the touchable regions in the
layer space.

Test: libgui_tests
Test: Rotated layer gets correct input
Fixes: 158802274
Change-Id: Ib0bfaa043509032ed702f442d806097bfd48d418
3 files changed