summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.h
diff options
context:
space:
mode:
authorXiaosong Wei <[email protected]>2017-02-08 10:46:02 +0800
committerEmil Velikov <[email protected]>2017-03-04 16:37:12 +0000
commit2acc69da8cefe622139d38985af897be5be1e169 (patch)
tree714c5a3f58f5c75667e782b40e831e0fdd931144 /src/egl/drivers/dri2/egl_dri2.h
parent2b1e22f9d8fff5395bb009557ef644aaa7b5ed3c (diff)
EGL/Android: Add EGL_EXT_buffer_age extension
This patch implements the EGL_EXT_buffer_age extension for Android. https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_buffer_age.txt Reviewed-by: Tapani Pälli <[email protected]> Acked-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.h')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index f3437e2b5a2..f981e3890b6 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -300,6 +300,15 @@ struct dri2_egl_surface
/* EGL-owned buffers */
__DRIbuffer *local_buffers[__DRI_BUFFER_COUNT];
+
+ /* Used to record all the buffers created by ANativeWindow and their ages.
+ * Usually Android uses at most triple buffers in ANativeWindow
+ * so hardcode the number of color_buffers to 3.
+ */
+ struct {
+ struct ANativeWindowBuffer *buffer;
+ int age;
+ } color_buffers[3], *back;
#endif
#if defined(HAVE_SURFACELESS_PLATFORM)