rects, n_rects);
}
+static EGLint
+dri2_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ return dri2_dpy->vtbl->query_buffer_age(drv, dpy, surf);
+}
+
static EGLBoolean
dri2_wait_client(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
{
dri2_drv->base.API.SwapInterval = dri2_swap_interval;
dri2_drv->base.API.SwapBuffers = dri2_swap_buffers;
dri2_drv->base.API.SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage;
+ dri2_drv->base.API.QueryBufferAge = dri2_query_buffer_age;
dri2_drv->base.API.CreateImageKHR = dri2_create_image_khr;
dri2_drv->base.API.DestroyImageKHR = dri2_destroy_image_khr;
#ifdef HAVE_DRM_PLATFORM
EGLBoolean (*swap_buffers)(_EGLDriver *drv, _EGLDisplay *dpy,
_EGLSurface *surf);
- EGLBoolean (*swap_buffers_with_damage)(_EGLDriver *drv, _EGLDisplay *dpy,
- _EGLSurface *surface,
- const EGLint *rects, EGLint n_rects);
+ EGLBoolean (*swap_buffers_with_damage)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surface,
+ const EGLint *rects, EGLint n_rects);
+
+ EGLint (*query_buffer_age)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surf);
};
struct dri2_egl_display
{
return EGL_FALSE;
}
+
+static inline EGLint
+dri2_fallback_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surf)
+{
+ return 0;
+}
.swap_interval = dri2_fallback_swap_interval,
.swap_buffers = droid_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
+ .query_buffer_age = dri2_fallback_query_buffer_age,
};
EGLBoolean
.swap_interval = dri2_fallback_swap_interval,
.swap_buffers = dri2_drm_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
+ .query_buffer_age = dri2_drm_query_buffer_age,
};
EGLBoolean
}
drv->API.CreateImageKHR = dri2_drm_create_image_khr;
- drv->API.QueryBufferAge = dri2_drm_query_buffer_age;
disp->Extensions.EXT_buffer_age = EGL_TRUE;
.swap_interval = dri2_wl_swap_interval,
.swap_buffers = dri2_wl_swap_buffers,
.swap_buffers_with_damage = dri2_wl_swap_buffers_with_damage,
+ .query_buffer_age = dri2_wl_query_buffer_age,
};
EGLBoolean
loader_set_logger(_eglLog);
drv->API.Terminate = dri2_wl_terminate;
- drv->API.QueryBufferAge = dri2_wl_query_buffer_age;
drv->API.CreateWaylandBufferFromImageWL =
dri2_wl_create_wayland_buffer_from_image_wl;
.destroy_surface = dri2_x11_destroy_surface,
.swap_interval = dri2_fallback_swap_interval,
.swap_buffers = dri2_x11_swap_buffers,
+ .query_buffer_age = dri2_fallback_query_buffer_age,
};
static struct dri2_egl_display_vtbl dri2_x11_display_vtbl = {
.swap_interval = dri2_x11_swap_interval,
.swap_buffers = dri2_x11_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
+ .query_buffer_age = dri2_fallback_query_buffer_age,
};
static EGLBoolean