diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2012-04-19 14:54:31 -0700 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2012-04-20 09:33:49 -0700 |
commit | 2ac76fe4e18c3325c8b3bb8f9435fdc7b96c0aca (patch) | |
tree | e9a2ec93fffb786b8eccf3f4bdba490c769337e6 /Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp | |
parent | 7ad2efca85a989d9ab57e311af605a6fed9c9925 (diff) | |
download | external_webkit-2ac76fe4e18c3325c8b3bb8f9435fdc7b96c0aca.zip external_webkit-2ac76fe4e18c3325c8b3bb8f9435fdc7b96c0aca.tar.gz external_webkit-2ac76fe4e18c3325c8b3bb8f9435fdc7b96c0aca.tar.bz2 |
Better handle the EGL context lost situation.
Unless framework provide a better message, we can't avoid this EGL context issue
totally if mis-match happen again.
Clean up some obsolete code.
Change-Id: Ica03daecd58f9757c8cad41e0f40d5d51b041748
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp b/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp index 9435065..7206c98 100644 --- a/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp @@ -298,49 +298,6 @@ static EGLSurface createPbufferSurface(EGLDisplay display, const EGLConfig& conf return surface; } -EGLContext GLUtils::createBackgroundContext(EGLContext sharedContext) -{ - checkEglError("<init>"); - EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY); - checkEglError("eglGetDisplay"); - if (display == EGL_NO_DISPLAY) { - ALOGE("eglGetDisplay returned EGL_NO_DISPLAY"); - return EGL_NO_CONTEXT; - } - - EGLint majorVersion; - EGLint minorVersion; - EGLBoolean returnValue = eglInitialize(display, &majorVersion, &minorVersion); - checkEglError("eglInitialize", returnValue); - if (returnValue != EGL_TRUE) { - ALOGE("eglInitialize failed\n"); - return EGL_NO_CONTEXT; - } - - EGLConfig config = defaultPbufferConfig(display); - EGLSurface surface = createPbufferSurface(display, config, 0); - - EGLint surfaceConfigId; - EGLBoolean success = eglGetConfigAttrib(display, config, EGL_CONFIG_ID, &surfaceConfigId); - - EGLint contextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; - EGLContext context = eglCreateContext(display, config, sharedContext, contextAttribs); - checkEglError("eglCreateContext"); - if (context == EGL_NO_CONTEXT) { - ALOGE("eglCreateContext failed\n"); - return EGL_NO_CONTEXT; - } - - returnValue = eglMakeCurrent(display, surface, surface, context); - checkEglError("eglMakeCurrent", returnValue); - if (returnValue != EGL_TRUE) { - ALOGE("eglMakeCurrent failed\n"); - return EGL_NO_CONTEXT; - } - - return context; -} - void GLUtils::deleteTexture(GLuint* texture) { glDeleteTextures(1, texture); |