Send all-window-drawn message of caller directly
It was posting to display thread and then ui thread, so if display thread is busy, the screen on callback can be delayed. So just let caller specify the message to send, then the callback can run on the target thread directly. It also eliminates the concern of arbitrary runnable which may be dangerous to run inside WM lock. Also move the end of trace waitForAllWindowsDrawn to where finishWindowsDrawn is called so it is more precise. Bug: 288581490 Test: Turn on screen and observe the end of trace waitForAllWindowsDrawn won't be affect by the messages in display thread. Change-Id: I875d3bec8a93a83798c093cd3c099fe8c022ae4b
Loading
Please register or sign in to comment