}
static EGLBoolean
+dri2_swap_buffers_with_damage(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surf,
+ const EGLint *rects, EGLint n_rects)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ return dri2_dpy->vtbl->swap_buffers_with_damage(drv, dpy, surf,
+ rects, n_rects);
+}
+
+static EGLBoolean
dri2_wait_client(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
dri2_drv->base.API.ReleaseTexImage = dri2_release_tex_image;
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.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);
};
struct dri2_egl_display
{
return EGL_FALSE;
}
+
+static inline EGLBoolean
+dri2_fallback_swap_buffers_with_damage(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surf,
+ const EGLint *rects, EGLint n_rects)
+{
+ return EGL_FALSE;
+}
.authenticate = NULL,
.swap_interval = dri2_fallback_swap_interval,
.swap_buffers = droid_swap_buffers,
+ .swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
};
EGLBoolean
.authenticate = dri2_drm_authenticate,
.swap_interval = dri2_fallback_swap_interval,
.swap_buffers = dri2_drm_swap_buffers,
+ .swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
};
EGLBoolean
.authenticate = dri2_wl_authenticate,
.swap_interval = dri2_wl_swap_interval,
.swap_buffers = dri2_wl_swap_buffers,
+ .swap_buffers_with_damage = dri2_wl_swap_buffers_with_damage,
};
EGLBoolean
drv->API.CreateWindowSurface = dri2_wl_create_window_surface;
drv->API.DestroySurface = dri2_wl_destroy_surface;
- drv->API.SwapBuffersWithDamageEXT = dri2_wl_swap_buffers_with_damage;
drv->API.Terminate = dri2_wl_terminate;
drv->API.QueryBufferAge = dri2_wl_query_buffer_age;
.authenticate = dri2_x11_authenticate,
.swap_interval = dri2_x11_swap_interval,
.swap_buffers = dri2_x11_swap_buffers,
+ .swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
};
static EGLBoolean