diff options
author | Jesse Hall <jessehall@google.com> | 2013-02-24 00:18:55 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-02-24 00:18:56 +0000 |
commit | f5c7cb316cc8c8e2d6ae93a659ac771420cbfa2b (patch) | |
tree | 222470d240944ace5353256533724e1b40855d62 /opengl/libs/EGL | |
parent | 751402c866968204af050f95d14a38cb3c3fa134 (diff) | |
parent | 5ea4c7305850ad4003d314597f4a8255b5b45ba4 (diff) | |
download | frameworks_native-f5c7cb316cc8c8e2d6ae93a659ac771420cbfa2b.zip frameworks_native-f5c7cb316cc8c8e2d6ae93a659ac771420cbfa2b.tar.gz frameworks_native-f5c7cb316cc8c8e2d6ae93a659ac771420cbfa2b.tar.bz2 |
Merge changes Ic344ef63,If9bb02be,Ic8f94634
* changes:
Symlink /system/lib/libGLESv3.so -> libGLESv2.so
Add ES3 support to libGLESv2 and tracing tools
Import OpenGL ES 3.0 headers from Khronos SVN
Diffstat (limited to 'opengl/libs/EGL')
-rw-r--r-- | opengl/libs/EGL/egl.cpp | 26 | ||||
-rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 36 | ||||
-rw-r--r-- | opengl/libs/EGL/egl_display.h | 20 | ||||
-rw-r--r-- | opengl/libs/EGL/egl_object.cpp | 20 | ||||
-rw-r--r-- | opengl/libs/EGL/egl_object.h | 20 | ||||
-rw-r--r-- | opengl/libs/EGL/trace.cpp | 5 |
6 files changed, 58 insertions, 69 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index bf2477a..a8691b5 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.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. */ @@ -23,8 +23,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <cutils/log.h> #include <cutils/atomic.h> @@ -232,7 +230,7 @@ static int gl_no_context() { return 0; } -static void early_egl_init(void) +static void early_egl_init(void) { #if !USE_FAST_TLS_KEY pthread_key_create(&gGLWrapperKey, NULL); @@ -243,8 +241,8 @@ static void early_egl_init(void) #endif uint32_t addr = (uint32_t)((void*)gl_no_context); android_memset32( - (uint32_t*)(void*)&gHooksNoContext, - addr, + (uint32_t*)(void*)&gHooksNoContext, + addr, sizeof(gHooksNoContext)); setGLHooksThreadSpecific(&gHooksNoContext); diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 7a84651..ed9db94 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.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. */ @@ -25,8 +25,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <cutils/log.h> #include <cutils/atomic.h> @@ -154,7 +152,7 @@ EGLBoolean eglTerminate(EGLDisplay dpy) if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE); EGLBoolean res = dp->terminate(); - + return res; } @@ -235,7 +233,7 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, if (attribRendererable && attribRendererable[1] == EGL_OPENGL_ES2_BIT && (!attribCaveat || attribCaveat[1] != EGL_NONE)) { - + // Insert 2 extra attributes to force-enable MSAA 4x EGLint aaAttribs[attribCount + 4]; aaAttribs[0] = EGL_SAMPLE_BUFFERS; @@ -272,7 +270,7 @@ EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, egl_connection_t* cnx = NULL; const egl_display_ptr dp = validate_display_connection(dpy, cnx); if (!dp) return EGL_FALSE; - + return cnx->egl.eglGetConfigAttrib( dp->disp.dpy, config, attribute, value); } @@ -371,7 +369,7 @@ EGLSurface eglCreatePbufferSurface( EGLDisplay dpy, EGLConfig config, } return EGL_NO_SURFACE; } - + EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) { clearError(); @@ -457,7 +455,7 @@ EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, if (attr == EGL_CONTEXT_CLIENT_VERSION) { if (value == 1) { version = egl_connection_t::GLESv1_INDEX; - } else if (value == 2) { + } else if (value == 2 || value == 3) { version = egl_connection_t::GLESv2_INDEX; } } @@ -492,7 +490,7 @@ EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) ContextRef _c(dp.get(), ctx); if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_FALSE); - + egl_context_t * const c = get_context(ctx); EGLBoolean result = c->cnx->egl.eglDestroyContext(dp->disp.dpy, c->context); if (result == EGL_TRUE) { @@ -540,7 +538,7 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw, // these are the current objects structs egl_context_t * cur_c = get_context(getContext()); - + if (ctx != EGL_NO_CONTEXT) { c = get_context(ctx); impl_ctx = c->context; @@ -638,7 +636,7 @@ EGLSurface eglGetCurrentSurface(EGLint readdraw) if (!c) return setError(EGL_BAD_CONTEXT, EGL_NO_SURFACE); switch (readdraw) { case EGL_READ: return c->read; - case EGL_DRAW: return c->draw; + case EGL_DRAW: return c->draw; default: return setError(EGL_BAD_PARAMETER, EGL_NO_SURFACE); } } diff --git a/opengl/libs/EGL/egl_display.h b/opengl/libs/EGL/egl_display.h index 7bb09a3..8bb32f4 100644 --- a/opengl/libs/EGL/egl_display.h +++ b/opengl/libs/EGL/egl_display.h @@ -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. */ @@ -24,8 +24,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <cutils/compiler.h> #include <utils/SortedVector.h> diff --git a/opengl/libs/EGL/egl_object.cpp b/opengl/libs/EGL/egl_object.cpp index aaa5e72..d3ee76d 100644 --- a/opengl/libs/EGL/egl_object.cpp +++ b/opengl/libs/EGL/egl_object.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. */ @@ -20,8 +20,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <utils/threads.h> diff --git a/opengl/libs/EGL/egl_object.h b/opengl/libs/EGL/egl_object.h index 2a08424..518fdec 100644 --- a/opengl/libs/EGL/egl_object.h +++ b/opengl/libs/EGL/egl_object.h @@ -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. */ @@ -24,8 +24,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <utils/threads.h> #include <utils/String8.h> diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp index a51b086..bac6ba8 100644 --- a/opengl/libs/EGL/trace.cpp +++ b/opengl/libs/EGL/trace.cpp @@ -21,8 +21,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <cutils/log.h> @@ -39,7 +37,8 @@ namespace android { // ---------------------------------------------------------------------------- struct GLenumString { - GLenum e; + // The GL_TIMEOUT_IGNORED "enum" doesn't fit in a GLenum, so use GLuint64 + GLuint64 e; const char* s; }; |