Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit db6c78b5 authored by Jack Palevich's avatar Jack Palevich
Browse files

Make GLSurfaceView handle eglSwapBuffers errors more robustly.



A careful reading of the EGL spec, as well as experience with many
different EGL drivers, has shown that it is error prone to attempt to
discriminate between different error conditions.

We now treat any error besides EGL_CONTEXT_LOST as an indication that the
EGL context is in a bad state, most likely due to the window manager
having removed the underlying surface flinger surface.

In addition, we changed the way we deal with this kind of error:
Previously we would ignore the error and keep rendering. But if the
EGL context and surface has become invalid, it would be better to
stop drawing. We now stop drawing until the surface view surface is
recreated.

See b/6032663 for an example of this problem affecting the GMM app,
but note that GMM is using their own version of GLSurfaceView, so this
change won't help them directly. They'll have to make a similar change
to their version of GLSurfaceView.

Change-Id: Iffe3e1e3a3c7a91d03140fd34391eadeaecf777e
Signed-off-by: default avatarJack Palevich <jackpal@google.com>
parent db202600
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment