diff options
author | Jamie Gennis <jgennis@google.com> | 2011-11-19 18:04:43 -0800 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2011-11-21 14:37:29 -0800 |
commit | 59769469e4b9b2d8b12c020eb44b030b3927a50b (patch) | |
tree | 6c220958421e9294e1bcbf80ecd316bef1f43c46 /opengl/libs | |
parent | 6f4cdfe0dbe50d1cc0ce8c03451ab261e8ea3232 (diff) | |
download | frameworks_native-59769469e4b9b2d8b12c020eb44b030b3927a50b.zip frameworks_native-59769469e4b9b2d8b12c020eb44b030b3927a50b.tar.gz frameworks_native-59769469e4b9b2d8b12c020eb44b030b3927a50b.tar.bz2 |
EGL: default to swap interval 1
This change explicitly sets swap interval 1 on the window when an
EGLSurface is created to render to it.
Change-Id: I91eb29dbee3ae4a55076b921f084d503fbe94e03
Diffstat (limited to 'opengl/libs')
-rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 2237eb6..a63d5b0 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -370,6 +370,11 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, } } + // the EGL spec requires that a new EGLSurface default to swap interval + // 1, so explicitly set that on the window here. + ANativeWindow* anw = reinterpret_cast<ANativeWindow*>(window); + anw->setSwapInterval(anw, 1); + EGLSurface surface = cnx->egl.eglCreateWindowSurface( iDpy, iConfig, window, attrib_list); if (surface != EGL_NO_SURFACE) { |