libhwui: handle eglSwapBuffers with EGL_BAD_NATIVE_WINDOW error case

If eglSwapBuffers is called but the under surface was destroyed,
the EGL_BAD_NATIVE_WINDOW error may also be generated according
to the EGL spec 1.4.

This really shouldn't happen from the upper, but add the graceful
handling of this case also.

Change-Id: Ic0a599808b72f401d2a01c3dc40f9e6ea0e0a564
Signed-off-by: Zhang Dongsheng <dongsheng.zhang@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
1 file changed