Fix flickering of screen resolution change with deferred updater
Before this change, the execution order from DeferredDisplayUpdater#requestDisplayChangeTransition is: 1. startCollectOrQueue 2. onStartCollect.run() 3. reconfigureDisplayLocked 4. requestChangeTransitionIfNeeded(collect display) 5. setDisplaySyncMethod WindowState#prepareSync with check the sync method in step 4, so it still uses non-blast sync, which causes the display cutout to not sync with display resize. This change reorders 4 and 5, so the behavior will be the same as ImmediateDisplayUpdater, i.e. the previous original behavior. Also removed setAllReady to let setReady() be called for individual display from WindowOrganizerController#startTransition -> applyDisplayChangeIfNeeded. That avoids potential too-early-ready. This is also to restore to previous original behavior. Bug: 318679910 Test: DisplayContentDeferredUpdateTests Test: Toggle screen resolution rapidly without flickering cutout. Change-Id: I68385ec62c72e0b3afbefd808cc95cd6995ea542
Loading
Please register or sign in to comment