X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=opengl%2Flibs%2FEGL%2FeglApi.cpp;h=01eeb6489dd1db98fde2e8c5cda2e0bd36e83f39;hb=519828c5b649e5e83f18444666f0672ab7852518;hp=0214b0eb56f19ad4e0e69dbfba941616cce17b66;hpb=1e9bf7c91b359747cc3d043caec66922618ca79d;p=android-x86%2Fframeworks-native.git diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 0214b0eb56..01eeb6489d 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -655,7 +655,8 @@ void getNativePixelFormat(EGLDisplay dpy, egl_connection_t* cnx, EGLConfig confi if (componentType == EGL_COLOR_COMPONENT_TYPE_FIXED_EXT) { if (colorDepth > 24) { format = HAL_PIXEL_FORMAT_RGBA_1010102; - } else { + } else if (!cnx->egl.eglGetConfigAttrib(dpy, config, EGL_NATIVE_VISUAL_ID, &format)) { + ALOGE("eglGetConfigAttrib(EGL_NATIVE_VISUAL_ID) failed: %#x", eglGetError()); format = HAL_PIXEL_FORMAT_RGBA_8888; } } else { @@ -1447,7 +1448,7 @@ const char* eglQueryString(EGLDisplay dpy, EGLint name) return setError(EGL_BAD_PARAMETER, (const char *)0); } -EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name) +extern "C" EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name) { clearError();