Skip to content
Commit 7ea6094f authored by Shawn Lin's avatar Shawn Lin
Browse files

Fix flickering when rapidly switch resolutions

- The screen decor layers are moved out from display due to a memory
  regression issue(b/235601833). So, the SC.captureLayers will no longer
  be able to include the screen decor layers.
  - We now use SC.captureDisplay instead for resolution chagne case.

- Previously, we hide the screen decor layers while animation is running
  and show them back when the animation ends, but it would cause flicker
  if user rapidly switch resolution. Because the previous
  ScreenRotationAnimation.kill() can be called after creating a new
  ScreenRotatioAnimation, then the screen decor layers hidden by the
  current animation are shown unexpectedly.
  Example:
  1. Anim1 start (hide decor layers)
  2. Anim2 start (hide decor layers)
  3. Anim1 end (show decor layers) -> flicker
  4. Anim2 end (show decor layers)
  - Only re-show the screen decor layers when current animation is the
    last one.

Bug: 237354783
Test: 1. Go Settings > Display > Screen resolution
      2. Rapidly switch resolutions
Change-Id: Ia42eb8538a07e49c0ddcd6d48470a1afc8caae5a
parent 6af81a2b
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