GLES translator: don't delete EGLImage textures

When remapping a GLES texture to a different GL texture in
glEGLImageTargetTexture2DOES(), the GLES texture's previous GL texture was
deleted unconditionally. This is bad when it came from an EGLImage and is
therefore owned by (and will continue to be used by) some other object.

The code now skips deleting the old GL texture if it came from an EGLImage.
This mirrors the logic in glDeleteTextures().

Change-Id: I5b650334a7019d824517c2915b1f23961fbbd809
1 file changed