replicant-frameworks_native/opengl/libs/EGL
Jesse Hall 312d7555cb egl: Remove window disconnect before calling driver eglDestroySurface
This was originally added for b/14445579. An in-development app was
attempting to render to a window as an EGLSurface, then tear that
down, change some window properties, and create a new EGLSurface. The
second eglCreateWindowSurface failed because the window was already
connected. This change went in, but it turned out the real problem was
that the app still (unintentionally) had the surface current. After
the app bug was fixed, nobody revisited whether this change was
actually needed.

Turns out it wasn't needed. After an EGLSurface is both destroyed
*AND* not current (basically refcount==0), we were already
disconnecting the window in ~egl_surface_t().

Apart from being unnecessary and redundant, disconnecting the window
here is wrong for two reasons:

(a) The surface may still be in use after eglDestroySurface, if it was
still current. Rendering is undefined in that case, but disconnecting
the window leads to more catastrophic results than necessary.

(b) It's being called before calling the driver's eglDestroySurface.
The driver will almost definitely have a buffer dequeued that it needs
to cancel, and by disconnecting first we turn that into an error that
they don't have a graceful way to deal with.

Bug: 24524053
Change-Id: Ib063134413d25d3526f794aafb5e333e3417ea42
2015-10-14 11:21:25 -07:00
..
egl_cache.cpp Make Flattenable not virtual 2013-07-30 21:19:13 -07:00
egl_cache.h
egl_display.cpp Remove lock around ref count check in terminate. 2015-01-28 11:54:15 -08:00
egl_display.h am d6fce7ab: Merge "Remove lock around ref count check in terminate." into lmp-mr1-dev 2015-01-28 22:38:42 +00:00
egl_entries.in Implement a number of KHR EGL extensions 2015-07-01 16:52:44 -07:00
egl_object.cpp Fix parsing of extension string 2015-07-31 09:26:58 -07:00
egl_object.h Fix EGL shim extension injection for GL ES 3 drivers. 2015-05-28 15:34:31 -07:00
egl_tls.cpp free EGL resources associated to a thread when it terminates 2013-05-30 16:07:36 -07:00
egl_tls.h free EGL resources associated to a thread when it terminates 2013-05-30 16:07:36 -07:00
egl.cpp Fix EGL shim extension injection for GL ES 3 drivers. 2015-05-28 15:34:31 -07:00
eglApi.cpp egl: Remove window disconnect before calling driver eglDestroySurface 2015-10-14 11:21:25 -07:00
egldefs.h Expose core EGL entry points to eglGetProcAddress 2014-03-27 17:28:40 -06:00
getProcAddress.cpp [MIPS] Fix mips32r1 build 2015-02-02 16:54:15 -08:00
Loader.cpp Expose core EGL entry points to eglGetProcAddress 2014-03-27 17:28:40 -06:00
Loader.h
trace.cpp Remove vestigial remnants of GLES2_dbg 2014-05-17 19:32:32 -07:00