From 9827547313c7239486efbd4067529575f98f1622 Mon Sep 17 00:00:00 2001 From: Harish Krupo Date: Fri, 9 Jun 2017 20:13:34 +0530 Subject: egl/android: support for EGL_KHR_partial_update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds support for the EGL_KHR_partial_update extension for android platform. It passes 36/37 tests in dEQP for EGL_KHR_partial_update. 1 test not supported. v2: add fallback for eglSetDamageRegionKHR (Tapani) v3: The native_window_set_surface_damage call is available only from Android version 6.0. Reintroduce the ANDROID_VERSION guard and advertise extension only if version is >= 6.0. (Emil Velikov) v4: use newly introduced ANDROID_API_LEVEL guard rather than ANDROID_VERSION guard to advertise the extension.The extension is advertised only if ANDROID_API_LEVEL >= 23 (Android 6.0 or greater). Add fallback function for platforms other than Android. Fix possible math overflow. (Emil Velikov) Return immediately when n_rects is 0. Place function's entrypoint in alphabetical order. (Eric Engestrom) v5: Replace unnecessary calloc with malloc (Eric) Check for BAD_ALLOC error (Emil) Check for error in native_window_set_damage_region. (Emil, Tapani, Eric). Signed-off-by: Harish Krupo Reviewed-by: Emil Velikov Reviewed-by: Eric Engestrom Reviewed-by: Tapani Pälli --- src/egl/main/eglsurface.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/egl/main/eglsurface.h') diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h index f13cf49741b..c53e8d00671 100644 --- a/src/egl/main/eglsurface.h +++ b/src/egl/main/eglsurface.h @@ -82,6 +82,18 @@ struct _egl_surface EGLint SwapInterval; + /* EGL_KHR_partial_update + * True if the damage region is already set + * between frame boundaries. + */ + EGLBoolean SetDamageRegionCalled; + + /* EGL_KHR_partial_update + * True if the buffer age is read by the client + * between frame boundaries. + */ + EGLBoolean BufferAgeRead; + /* True if the surface is bound to an OpenGL ES texture */ EGLBoolean BoundToTexture; -- cgit v1.2.3