Loading
ViewRootImpl: Fix issue with early draw report in seamless rotation
When we receive RELAYOUT_RES_BLAST_SYNC from the WindowManager, we trigger reportNextDraw, incrementing the pending draw count by one. At the moment we unfortunately do this after dispatching callbacks to SurfaceView. In the span of these callbacks, SurfaceView may increment and decrement pending draw count, once it reaches zero we will notify the WM of draw early, terminating the sync operation without ever waiting for the ViewRootImpl to draw. By processing RELAYOUT_RES_BLAST_SYNC before emitting the SurfaceView callbacks we can avoid this issue. Bug: 191921061 Test: Existing tests pass Change-Id: I2f1096c9cdc79b89413c3f0bfd9b3054ef45f2d2