From 87f3265bb082160efdfdfb87a79698c67ebad447 Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Sat, 19 Nov 2011 18:04:43 -0800 Subject: 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 --- opengl/libs/EGL/eglApi.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'opengl/libs/EGL/eglApi.cpp') 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(window); + anw->setSwapInterval(anw, 1); + EGLSurface surface = cnx->egl.eglCreateWindowSurface( iDpy, iConfig, window, attrib_list); if (surface != EGL_NO_SURFACE) { -- cgit v1.1