don't use compile-time configuration of libgui as much as possible

We now detect at runtime which sync features to use, which
allows us to remove a lot of the compile-time configuration
options. There  is still one option though, to disable
KHR_fence_sync on some devices (which are more efficient
without it).

- added a backdoor to get the vendor's EGL strings

the new logic is:
- use always ANDROID_native_fence_sync if available
- fallback to KHR_fence_sync if available and not disabled
  by the compile-time option
- use KHR_wait_sync if available and either of the above is
  enabled

Change-Id: I9c4b49d9ff1151faf902cc93bd53ea5f205aaabf
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 50b08b0..1be4961 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -52,8 +52,6 @@
 
 // ----------------------------------------------------------------------------
 
-#define EGL_VERSION_HW_ANDROID  0x3143
-
 namespace android {
 
 struct extention_map_t {
@@ -1021,12 +1019,29 @@
             return dp->getExtensionString();
         case EGL_CLIENT_APIS:
             return dp->getClientApiString();
-        case EGL_VERSION_HW_ANDROID:
-            return dp->disp.queryString.version;
     }
     return setError(EGL_BAD_PARAMETER, (const char *)0);
 }
 
+EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name)
+{
+    clearError();
+
+    const egl_display_ptr dp = validate_display(dpy);
+    if (!dp) return (const char *) NULL;
+
+    switch (name) {
+        case EGL_VENDOR:
+            return dp->disp.queryString.vendor;
+        case EGL_VERSION:
+            return dp->disp.queryString.version;
+        case EGL_EXTENSIONS:
+            return dp->disp.queryString.extensions;
+        case EGL_CLIENT_APIS:
+            return dp->disp.queryString.clientApi;
+    }
+    return setError(EGL_BAD_PARAMETER, (const char *)0);
+}
 
 // ----------------------------------------------------------------------------
 // EGL 1.1