Skip to content
Commit 07d9444e authored by Tiger Huang's avatar Tiger Huang
Browse files

Push the frame to InsetsSourceProvider

This CL stops InsetsSourceProvider from reading the frame from the
window. Instead, the caller sets the frame via #updateSourceFrame.

When the window layout is moved to the client side, when the rotation is
changed, we need to dispatch the InsetsState computed from the new
rotation to all the clients. At this moment, the window frames of insets
source windows are not up-to-date yet, and we cannot use them to
generate insets sources. Instead, we pre-compute the window frames based
on the new rotation at the server side, and use them to update
InsetsState. In this way, the first InsetsState dispatched to the client
after rotation will be correct.

This CL also

- unbundles the calling order of setServerVisible and updateSourceFrame.
  The calling order won't affect the result.

- moves logic from DisplayPolicy#layoutWindowLw to WindowState#setFrames
  because we plan to remove layoutWindowLw in the future.

- removes redundant logs about layout. The log in
  WindowLayout#computeFrames can cover them all.

Bug: 161810301
Test: Perform fixed rotation, seamless rotation, and regular rotation
      and see if the layout of each window is expected.
Change-Id: Ie7845de2830cdbdfd0049b8eef5a5f0704f796e8
parent d7556376
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment