summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2013-08-07 15:23:02 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-07 15:23:05 +0000
commit43c2718b3fb404d72d711eb37d5c5d10edc97605 (patch)
tree6cbab2db0351b69cbc8fb126e0ed2e427eb49de3 /opengl
parentff866e7642033d8f68c11eaa16d0afcecf0bab5b (diff)
parent21558daf691dbcdff4a41e659fd013273db4d0b7 (diff)
downloadframeworks_native-43c2718b3fb404d72d711eb37d5c5d10edc97605.zip
frameworks_native-43c2718b3fb404d72d711eb37d5c5d10edc97605.tar.gz
frameworks_native-43c2718b3fb404d72d711eb37d5c5d10edc97605.tar.bz2
Merge "Add EGL_KHR_get_all_proc_addresses to extension string"
Diffstat (limited to 'opengl')
-rw-r--r--opengl/libs/EGL/eglApi.cpp23
-rw-r--r--opengl/libs/EGL/egl_display.cpp21
2 files changed, 26 insertions, 18 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 6dfd306..8a0522e 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -59,16 +59,24 @@ struct extention_map_t {
};
/*
- * This is the list of EGL extensions exposed to applications,
- * some of them are mandatory because used by the ANDROID system.
+ * This is the list of EGL extensions exposed to applications.
*
- * Mandatory extensions are required per the CDD and not explicitly
- * checked during EGL initialization. the system *assumes* these extensions
- * are present. the system may not function properly if some mandatory
- * extensions are missing.
+ * Some of them (gBuiltinExtensionString) are implemented entirely in this EGL
+ * wrapper and are always available.
*
- * NOTE: gExtensionString MUST have a single space as the last character.
+ * The rest (gExtensionString) depend on support in the EGL driver, and are
+ * only available if the driver supports them. However, some of these must be
+ * supported because they are used by the Android system itself; these are
+ * listd as mandatory below and are required by the CDD. The system *assumes*
+ * the mandatory extensions are present and may not function properly if some
+ * are missing.
+ *
+ * NOTE: Both strings MUST have a single space as the last character.
*/
+extern char const * const gBuiltinExtensionString =
+ "EGL_KHR_get_all_proc_addresses "
+ "EGL_ANDROID_presentation_time "
+ ;
extern char const * const gExtensionString =
"EGL_KHR_image " // mandatory
"EGL_KHR_image_base " // mandatory
@@ -84,7 +92,6 @@ extern char const * const gExtensionString =
"EGL_NV_system_time "
"EGL_ANDROID_image_native_buffer " // mandatory
"EGL_KHR_wait_sync " // strongly recommended
- "EGL_ANDROID_presentation_time "
;
// extensions not exposed to applications but used by the ANDROID system
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index 1955904..8d7890b 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -1,16 +1,16 @@
-/*
+/*
** Copyright 2007, The Android Open Source Project
**
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
**
- ** http://www.apache.org/licenses/LICENSE-2.0
+ ** http://www.apache.org/licenses/LICENSE-2.0
**
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
** limitations under the License.
*/
@@ -35,6 +35,7 @@ static char const * const sVendorString = "Android";
static char const * const sVersionString = "1.4 Android META-EGL";
static char const * const sClientApiString = "OpenGL_ES";
+extern char const * const gBuiltinExtensionString;
extern char const * const gExtensionString;
extern void initEglTraceLevel();
@@ -183,7 +184,7 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) {
mVersionString.setTo(sVersionString);
mClientApiString.setTo(sClientApiString);
- // we only add extensions that exist in the implementation
+ mExtensionString.setTo(gBuiltinExtensionString);
char const* start = gExtensionString;
char const* end;
do {