Apps' drawing may hang when switching between them.
Description
Apps may hang when switching between them.
For example, here is the case, which 100% hangs the drawing.
1) Open YouTube app
2) Start playing a video
3) Open another app
4) It second app hangs.
5) Go back to first app - it is also hanged.
Most probably, it happens because we don't honor Active, Inactive, Visible, Invisible and other events from libwindowmanager. Going to implement them and see if something happens.
The solution was to make GLSurfaceWayland (used with in-process-gpu mode) to use wl_surface_frame, which made it to wait a callback from the compositor to send new frames.
The error is a typical scenario of gpu thread hang that causes eventually app launching to hang too (and any other call for gpu process host).
After further examination we found that the gpu thread hangs in eglSwapBuffers call. And we observed that, when an app is sent to background, eglSwapBuffer hangs. If we reopen that application, then the call will finish and it will continue rendering.
But in the scenario where we open a different application, that eglSwapBuffers call will*not* finish. Then the second app hangs trying to connect to gpu thread through gpu process host initialization.
This scenario happens when we are emiting frames while we send an application offscreen (i.e. playing video or a css animation can get you to this scenario).
Maksim Sisov
December 21, 2018 at 9:40 AM
We have added resume/suspend support, but the issue is still there.
Looks like a browser process waits for a connection with the gpu, but it's hang. Check thread 1 and 15.
Apps may hang when switching between them.
For example, here is the case, which 100% hangs the drawing.
1) Open YouTube app
2) Start playing a video
3) Open another app
4) It second app hangs.
5) Go back to first app - it is also hanged.
Most probably, it happens because we don't honor Active, Inactive, Visible, Invisible and other events from libwindowmanager. Going to implement them and see if something happens.