Skip to content

Commit

Permalink
Merge commit '945e1f3fdf347e4e7687d45a3b6e5ef3b5be2311' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Google Automerger committed Feb 23, 2016
2 parents 18bd4f1 + 945e1f3 commit edb3ea7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
8 changes: 0 additions & 8 deletions samples-android/Common/ndk_helper/GLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,6 @@ bool GLContext::InitEGLSurface() {
eglQuerySurface(display_, surface_, EGL_WIDTH, &screen_width_);
eglQuerySurface(display_, surface_, EGL_HEIGHT, &screen_height_);

/* EGL_NATIVE_VISUAL_ID is an attribute of the EGLConfig that is
* guaranteed to be accepted by ANativeWindow_setBuffersGeometry().
* As soon as we picked a EGLConfig, we can safely reconfigure the
* ANativeWindow buffers to match, using EGL_NATIVE_VISUAL_ID. */
EGLint format;
eglGetConfigAttrib(display_, config_, EGL_NATIVE_VISUAL_ID, &format);
ANativeWindow_setBuffersGeometry(window_, 0, 0, format);

return true;
}

Expand Down
10 changes: 1 addition & 9 deletions samples-android/Minimalist/src/main/jni/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static int engine_init_display(struct engine* engine) {
const EGLint attribs[] = {EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_BLUE_SIZE,
8, EGL_GREEN_SIZE, 8,
EGL_RED_SIZE, 8, EGL_NONE};
EGLint w, h, dummy, format;
EGLint w, h, dummy;
EGLint numConfigs;
EGLConfig config;
EGLSurface surface;
Expand All @@ -109,14 +109,6 @@ static int engine_init_display(struct engine* engine) {
* the first EGLConfig that matches our criteria */
eglChooseConfig(display, attribs, &config, 1, &numConfigs);

/* EGL_NATIVE_VISUAL_ID is an attribute of the EGLConfig that is
* guaranteed to be accepted by ANativeWindow_setBuffersGeometry().
* As soon as we picked a EGLConfig, we can safely reconfigure the
* ANativeWindow buffers to match, using EGL_NATIVE_VISUAL_ID. */
eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &format);

ANativeWindow_setBuffersGeometry(engine->app->window, 0, 0, format);

surface = eglCreateWindowSurface(display, config, engine->app->window, NULL);
context = eglCreateContext(display, config, NULL, NULL);

Expand Down

0 comments on commit edb3ea7

Please sign in to comment.