summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-07-11 15:47:20 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-11 15:47:20 -0700
commit308f9f6b248402c67d73c3ad48f5b6b888bab7b7 (patch)
treecf57cc66cbd45cb7506691ab1492882066731bee /opengl
parentf21f07627df3ad4381fdd3daf47289eeda9754d3 (diff)
parent97eae025ad857e33dce5b3d1d4fd5fe5813d2a80 (diff)
downloadframeworks_base-308f9f6b248402c67d73c3ad48f5b6b888bab7b7.zip
frameworks_base-308f9f6b248402c67d73c3ad48f5b6b888bab7b7.tar.gz
frameworks_base-308f9f6b248402c67d73c3ad48f5b6b888bab7b7.tar.bz2
Merge "EGL: fix the ANativeWindow size/fmt override"
Diffstat (limited to 'opengl')
-rw-r--r--opengl/libs/EGL/eglApi.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 7d5d010..ba5d29a 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -367,7 +367,12 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
if (cnx->egl.eglGetConfigAttrib(iDpy,
iConfig, EGL_NATIVE_VISUAL_ID, &format)) {
if (format != 0) {
- native_window_set_buffers_geometry(window, 0, 0, format);
+ int err = native_window_set_buffers_format(window, format);
+ if (err != 0) {
+ LOGE("error setting native window pixel format: %s (%d)",
+ strerror(-err), err);
+ return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
+ }
}
}