Fix the flickering on display/font size page
In framework design, framework needs to have a snapshot when there's a config change event since redrawing window takes some time. Flickering problem is caused by the timing issue between the snapshot mechinsm and local preview update. User can observe the flickering problem if config commit()-> snapshot in framework(old screenshot) -> app update the preview -> snapshot(old screen) fade out. To prevent this problem, we make sure that we update the local preview first and then we do the commit later. In this proposal, snapshot action is able to get the new snaptshot for the new preview. So, the core workaround is commitOnNextFrame, we ask a delay before we submit the commit(). Note: It doesn't matter that we use Choreographer or main thread handler since the delay time is longer than 1 frame. Use Choreographer to let developer understand it's a window update. Fix: 148192402 Test: manual test Change-Id: I9bfc5eb39e7a9ebce2fe1414d6f0a9dd470708e8
Loading
Please register or sign in to comment