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
Loading
Please register or sign in to comment